we tried to send json build with arduino json to a php page, the page response the sended post data.
after running below code the post is empty.
can someone explain what we do wrong.
String postData = "{\"naam\":\"ik\"}";
String dataStr = postData;
apiconnectie.beginRequest();
apiconnectie.post(path);
apiconnectie.print("Content-Length: ");
apiconnectie.println(postData.length());
apiconnectie.println();
apiconnectie.println(postData);
apiconnectie.beginBody();
apiconnectie.print(dataStr);
apiconnectie.endRequest();
statusCode = apiconnectie.responseStatusCode();
response = apiconnectie.responseBody();
Serial.println("Status code: ");
Serial.println(statusCode);
Serial.println("Response: ");
Serial.println(response);
thanks for your time