Open
Description
Hi, I'm trying to stablish communication with a server that uses https but without sucess. I have been striving to login to that server but without success.. This is how I do it
HttpClient http(client1,serverAddress);
const int kNetworkTimeout = 3*1000;
// Number of milliseconds to wait if no data is available before trying again
const int kNetworkDelay = 1000;
void Get_token(){
http.beginRequest();
http.post("/api/auth/login","application/json", "");
http.sendHeader("Authorization","Basic c2XBzaXNfdTpmNFgwXktpVjZKQlEzy");
http.endRequest()
int statusAuth = http.responseStatusCode();
String response = http.responseBody();
Serial.print("Response: ");
Serial.println(response);
Serial.print("Status response:");
Serial.println(statusAuth);
}
void setup(){
Serial.begin(115200);
Serial2.begin(115200);
conexionsim();
conexionred();
Get_token();
}
I always receive -3, which is timeout