Webhook widget

I use Openweather, but I don’t use webhook widget

void forecast() {
  WiFiClient client;
  HTTPClient http;  //Declare an object of class HTTPClient

  http.begin(client, "http://api.openweathermap.org/data/2.5/weather?id=yourID&units=metric&lang=fr");  //Specify request destination
  int httpCode = http.GET();     //Send the request

  if (httpCode > 0) { //Check the returning code
    payload = http.getString();   //Get the request response payload
  }
  http.end();   //Close connection
  JsonRequest(); //call Json
}
2 Likes