Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. if (http.begin(client, host)) { // HTTP
  2.  
  3. http.addHeader("Content-Type", "application/json");
  4. // Serial.print("[HTTP] GET...n");
  5. // start connection and send HTTP header
  6. // int httpCode = http.GET();
  7. String request = "{ "temperature": 27.0, "humidity": 43 }";
  8. Serial.print("[HTTP] POST...n");
  9. int httpCode = http.POST(request);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement