DaKaZ / esp8266-restclient

Arduino RESTful HTTP Request Library
MIT License
124 stars 26 forks source link

Default content type not set correctly #8

Open alkor97 opened 6 years ago

alkor97 commented 6 years ago

The following code put in RestClient constructor will not work (by default all member pointers have undefined values, not NULLs):

if (contentType == NULL) {
  contentType = "application/x-www-form-urlencoded";  // default
}

Working solution would be just getting rid of if clause:

contentType = "application/x-www-form-urlencoded";

Observed on WeMos whild sending POST requests.

DaKaZ commented 5 years ago

@alkor97 sorry for the long delay. Please see commit 60c5191 and let me know if this fixes your issue.