SHARE
TWEET

Untitled

a guest Jun 15th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top