Guest User


a guest
Sep 4th, 2017
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IPAddress server(192,168,1,120); // server IP address
  2. char PostData[] = "{\"name\": \"Fred\", \"age\": 31}"; // your JSON payload
  4. .....
  6. if (client.connect(server, 80)) {
  7. client.println("POST /doit HTTP/1.1");
  8. client.println("Host:"); // or generate from your server variable to not hardwire
  9. client.println("User-Agent: Arduino/unowifi");
  10. client.println("Connection: close");
  11. client.print("Content-Length: ");
  12. client.println(strlen(PostData));// number of bytes in the payload
  13. client.println();// important need an empty line here
  14. client.println(PostData);// the payload
  15. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.