Hey Everyone,
I am new to this Arduino, and trying to make HTTPPOST request using "ESPAsyncWebServer" lib, but I want to add query parameters to the URL for the POST req. se Example Below for more understanding
My code for HTTP_POST
server.on(
"/post",
HTTP_POST,
[](AsyncWebServerRequest *request) {},
NULL,
[](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total) {
/* StaticJsonDocument<200> jsonData;
char json[] = data */
String m;
for (size_t i = 0; i < len; i++) {
Serial.write(data[i]);
}
request->send(200, "text/plain", "Hello, POST: " + m);
});
}
if I hit the above endpoint without queryParams like "POST http://192.168.4.1/post" it works fine, But I want to ad queryParams and hit it like "POST http://192.168.4.1/post/?pr=test".
and cannot change the HTTP method to GET as I also have some JSON payload to handle..
any help is highly appreciated