Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (http.begin(client, host)) { // HTTP
- http.addHeader("Content-Type", "application/json");
- // Serial.print("[HTTP] GET...n");
- // start connection and send HTTP header
- // int httpCode = http.GET();
- String request = "{ "temperature": 27.0, "humidity": 43 }";
- Serial.print("[HTTP] POST...n");
- int httpCode = http.POST(request);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement