hiii, This is for Sending HTTPS POST request to clould function server by using sim800l gprs module.the main problem is its could not send the data to server but its connects the server and its shows bad request 400.I can't understand the problem.the code will be given below.i use NODEMCU-32S micro controller.
SerialMon.println("Performing HTTP POST request...");
String httpRequestData = String(requestBody) +"";
client.print(String("POST ") + resource + " HTTP/1.1\r\n");
client.print(String("Host: ") + server + "\r\n");
client.println("Connection: close");
client.println("Content-Type: application/json");
client.print("Content-Length: ");
client.println(httpRequestData.length());
client.println();
client.println(httpRequestData);
timeout = millis();
while (client.connected() && millis() - timeout < 10000L) {
while (client.available()) {
char c = client.read();
SerialMon.print(c);
timeout = millis();
}
}
enter image description here <--this is the output image.
please help me to find out the solution.