Ajuda com commando curl

Iaee galera! Um salve a todos! Galera estou sendo espancado por algo que acredito ser simples.

Estou rodando o seguinte codigo em um ESP32…

#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>

const char* ssid = “YOUR_SSID”;
const char* password = “YOUR_PASSWORD”;

const int LED_PIN = 33;

AsyncWebServer server(80);
AsyncWebSocket webSocket(“/ws”);

int ledState = LOW;

void handleWebSocketEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type, void *arg, uint8_t *data, size_t len) {
switch (type) {
case WS_EVT_DISCONNECT:
Serial.printf(“[%u] Disconnected!\n”, client->id());
break;

case WS_EVT_CONNECT:
  {
    IPAddress ip = client->remoteIP();
    Serial.printf("[%u] Connected from %d.%d.%d.%d\n", client->id(), ip[0], ip[1], ip[2], ip[3]);
  }
  break;

case WS_EVT_DATA:
  {
    AwsFrameInfo *info = (AwsFrameInfo*)arg;
    if (info->final && info->index == 0 && info->len == len && info->opcode == WS_TEXT) {
      data[len] = '\0';
      String payload = String((char*)data);

      Serial.printf("[%u] Received: %s\n", client->id(), payload.c_str());
      if (payload == "toggle") {
        ledState = !ledState;
        // digitalWrite(LED_PIN, ledState);
        digitalWrite(LED_PIN, !ledState); // For AI thinker LED control is inverted (pin33)
      }
    }
  }
  break;

}
}

void setup() {
Serial.begin(115200);

pinMode(LED_PIN, OUTPUT);

WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println(“Connecting to WiFi…”);
}
Serial.println(“Connected to WiFi”);

Serial.print("IP Address: ");
Serial.println(WiFi.localIP());

Serial.println(“Client to Server WebSockets with ESPAsyncWebServer.h”);

server.on(“/”, HTTP_GET, handleRoot);

server.addHandler(&webSocket);
webSocket.onEvent(handleWebSocketEvent);

server.begin();
}

// Correct led start state. Changed all new led bits to prefix new…
void handleRoot(AsyncWebServerRequest *request) {

request->send(200, “text/html”, R"HTML(

ESP32 Websocket Example - Client to Server

Toggle LED
)HTML"); } // END OF void handleRoot(AsyncWebServerRequest *request)

void loop() {
}

Entao ele gera uma pagina web com um botao que liga e desliga o led…o que eu preciso eh saber qual a sintaxe de comando curl para ligar e desligar o led sem prescisar clicar no botao.

Agradeço qualquer ajuda, sou “carroceiro full” :smiley: