programowanie:esp32:http

To jest stara wersja strony!


HTTP na ESP32


Deklaracje

#include <HTTPClient.h>
 
HTTPClient httpClient;


HTTP GET request

String url = "https://sases.pl";
 
if(WiFi.status()== WL_CONNECTED)
{
  httpClient.begin(url.c_str());
  int httpResponseCode = httpClient.GET();
 
  if (httpResponseCode > 0) 
  {
    if (httpResponseCode == 200)
    {
      String payload = httpClient.getString();  // String z zawartością URL
      httpClient.end();
    }
  }
}
  • programowanie/esp32/http.1728308718.txt.gz
  • ostatnio zmienione: 2024/10/07 15:45
  • przez sases