Hello everybody!
so far i have been posting my data to api.thingspeak and went cool...now i wanted to post some data to another api....i just cant....heres the link to which i want to post my data to....i got this link from webpage's
"developer's options"
HTTP/1.1 304 Not Modified
Server: Cowboy
Content-Length: 0
Connection: keep-alive
X-Powered-By: Express
Access-Control-Allow-Origin: *
Etag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
Date: Wed, 02 Jan 2019 09:46:56 GMT
Via: 1.1 vegur
and heres how i did to thingspeaks'
client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: " + API_KEY + "\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);
delay(1000);
and heres how i merged 'em and they didnt work
client.print("POST /HTTP/1.1 200 OK\n");
client.print("Server: Cowboy\n");
client.print("Connection: keep-alive\n");
client.print("X-Powered-By: Express\n");
client.print("Access-Control-Allow-Origin: *\n");
client.print("Content-Length: 2");
// client.print(postStr.length());
// client.print("\n\n");
client.print(postStr);
also i expected to use http.prient,but that works only for arduino yun....it would have been easier with that function if it was cool with node mcu.....could someone please suggest me with a solution
thanks in advance