How to use <ESP8266HTTPClient.h> to request method POST instantly like in POSTMAN api test?
I just use URL to POST request method in postman and its work.
i can post with postman, but in arduino i still get 505 eror message, here the arduino code using ESP8266Client.h library
void loop() {
if(WiFi.status()== WL_CONNECTED){
HTTPClient http;
http.begin("http://iot-my.herokuapp.com/api/user/ 2E 84 53 63/increment_points");
http.addHeader("Content-Type", "application/json");
int httpCode = http.POST("");
String payload = http.getString();
Serial.println(httpCode);
Serial.println(payload);
http.end();
}else{
Serial.println("Error in WiFi connection");
}
delay(30000);
}
and here my test POST method screenshot with postman (i dont use any setting, just use URL)