-->
Page 1 of 2

Is there a example about POST in esp8266httpclient.h?

PostPosted: Fri Jul 01, 2016 9:48 am
by tyxiang
I want to post like a=1&b=2&c=3

Re: Is there a example about POST in esp8266httpclient.h?

PostPosted: Fri Jul 01, 2016 8:51 pm
by martinayotte
If you do some more searches, you will find that you can easily do some GET or POST using simple example such ESP8266WiFi/examples/WiFiClient/WiFiClient.ino

EDIT : Using ESP8266HTTPClient/src/ESP8266HTTPClient.h, it should be quite the same :
int HTTPClient::POST(String payload)

Re: Is there a example about POST in esp8266httpclient.h?

PostPosted: Tue Jul 05, 2016 6:38 pm
by kenn
A question for you Martin, or any other smart person 8-) : of the different library choices for making HTTP requests, do you have a preferred library? If so, why: better syntax, faster method, smaller binary, etc?

Thanks. I've just moved over to the Arduino way of using ESP8266. It seems that this is where the most action is.

Re: Is there a example about POST in esp8266httpclient.h?

PostPosted: Tue Jul 05, 2016 7:18 pm
by martinayotte
I'm not sure of understanding the question ...
Personally, I've not yet got any needs to do a POST from ESP on remote server.
But if I need to do so, the API I've mentioned would be my first try to avoid reinventing the wheel.
If I wish to have smaller code, yes, I could do my own POST only using WiFiClient.