Skip to content

getting data from a POST request #1321

@sukhmeet032795

Description

@sukhmeet032795

i have a url /wifiSetup. Whenever a user sends post request to the esp, some json is sent along with
the url. I want to get the json content in my handler

Code:

ESP8266WebServer server1(80);
server1.on("/wifiSetup", wifiSetup);

void wifiSetup(){

WiFiClient client = server.available();
while(client.available()) {
Serial.print(client.read()); // print client data
}
}

This return me POST /wifiSetup HTTP/1.1
I want the json content sent along with the request. How can i get the json?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions