Open michelep opened 6 years ago
Sorry for the complete lack of response, I did not see this issue get created. I have not personally used the library with a pointer. Obviously you are getting some memory corruption. The new RestClient
should properly alloc your memory. So some more questions:
Are you ever calling restClient->setContentType
? If you are, you might need to strdup (or we can update the library (see https://github.com/DaKaZ/esp8266-restclient/blob/master/RestClient.cpp#L145)
Is the body correct there? I am assuming no since the length is reported at 36 and your body key=KEY&t=21.60&h=39.80
is only 23, but maybe you removed KEY?
Hi,
first, thanks for your work. I have a strange behaviuor using your RestClient library as a pointer. I define a RestClient object as a pointer, because i need to create it after loading the collector host IP from a config file:
RestClient *restClient;
Later i initialize the object:
and i send data via POST like:
but watching data with tcpdump, i see strange behavour in header like:
Any help really appreciated !