COAP "POST" Example code

Harshad P
Posts: 7
Joined: Wed Apr 14, 2021 6:27 am

COAP "POST" Example code

Postby Harshad P » Tue Apr 20, 2021 11:48 am

Hello All,

There's an example for CoAP-Clienthttps://github.com/espressif/esp-idf/tr ... oap_client in ESP-IDF which is used to GET data. Now I was trying to do a project to POST data to server, However I couldn't proceed since there's no POST functions I could find in it's libraries too.

If there's an example with POST data or someone has developed some simple application code for POST data please do help.

Regards,

ESP_YJM
Posts: 300
Joined: Fri Feb 26, 2021 10:30 am

Re: COAP "POST" Example code

Postby ESP_YJM » Sun Apr 25, 2021 2:28 am

You can change code from COAP_REQUEST_GET to COAP_REQUEST_POST. https://github.com/espressif/esp-idf/bl ... ain.c#L134

Who is online

Users browsing this forum: Baidu [Spider] and 159 guests