forked from csquared/arduino-restclient
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
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:
...
restClient = new RestClient(config.collector_host);
....
and i send data via POST like:
char query[128];
String response="";
...
sprintf(query,"key=%s&ts=%d&t=%s&p=%s&h=%s&uv=%d&pm25=%s&pm10=%s",config.api_key,data.ts,data.temp,data.pres,data.hum,data.uv,data.pm25,data.pm10);
statusCode = restClient->post("/rest/data/put", query, &response);
but watching data with tcpdump, i see strange behavour in header like:
POST /rest/data/put HTTP/1.1
Host: [host]:80
Connection: close
Content-Length: 36
**Content-Type: L.).**
key=KEY&t=21.60&h=39.80
Any help really appreciated !
Metadata
Metadata
Assignees
Labels
No labels