Skip to content

I'm having problem with https websites #87

Open
@gomezramones

Description

@gomezramones

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions