even if it works with default HTTP port 80, i cannot use it whith server on 8080: http.POST(...) returns -1.
doing this way:
Code: Select all
if(WiFi.status()== WL_CONNECTED){
HTTPClient http = HTTPClient("192.168.102.23", 8080);
String httpRequestData = "serial=1&temp=29";
int httpResponseCode = http.POST("/MR-Prototype/app/data/values/add", "application/x-www-form-urlencoded", httpRequestData);
if (httpResponseCode > 0){
Serial.print("HTTP Response code: ");
Serial.println(httpResponseCode);
Serial.println("Response payload:");
Serial.println(http.getString());
} else {
Serial.print("Error code: ");
Serial.println(httpResponseCode);
}
http.end();
}