ESP8266Kinto.cpp
// Public Methods //////////////////////////////////////////////////////////////
// Functions available in ESP8266Kinto sketches, this library, and other libraries
Public Methods
Functions available in ESP8266Kinto sketches, this library, and other libraries
Public Methods Functions available in ESP8266Kinto sketches this library and other libraries
void Kinto::post(String json) {
  digitalWrite(LED_BUILTIN, LOW);
  #ifdef DEBUG
  Serial.println(url);
  Serial.println(json);
  #endif
  HTTPClient http;
  if (server[4] == 's') {
    http.begin(url, fingerprint);
  }
  else {
    http.begin(url);
  }
  http.addHeader("Content-Type", "application/json");
  http.setAuthorization(token, secret);
  http.POST(json);
  http.end();
  digitalWrite(LED_BUILTIN, HIGH);
}
void Kinto :: post ( String json ) { digitalWrite ( LED_BUILTIN , LOW ) ; #ifdef DEBUG Serial . println ( url ) ; Serial . println ( json ) ; #endif HTTPClient http ; if ( server [ 4 ] == ' ' ) { http . begin ( url , fingerprint ) ; } else { http . begin ( url ) ; } http . addHeader ( " " , " " ) ; http . setAuthorization ( token , secret ) ; http . POST ( json ) ; http . end ( ) ; digitalWrite ( LED_BUILTIN , HIGH ) ; }
Public Methods
Functions available in ESP8266Kinto sketches, this library, and other libraries
Public Methods Functions available in ESP8266Kinto sketches this library and other libraries