Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

How can I send https requests? #18

Closed
jitendra1607 opened this issue Aug 29, 2021 · 2 comments
Closed

How can I send https requests? #18

jitendra1607 opened this issue Aug 29, 2021 · 2 comments
Labels
Support Library support wontfix This will not be worked on

Comments

@jitendra1607
Copy link

jitendra1607 commented Aug 29, 2021

If i change http -> https then request fails "Can't send bad request". How can I send https requests?

`
requestOpenResult = request.open("GET", "https://worldtimeapi.org/api/timezone/America/Toronto.txt");

if (requestOpenResult)
{
  // Only send() if open() returns true, or crash
  request.send();
}
else
{
  Serial.println("Can't send bad request");
}

`

@khoih-prog
Copy link
Owner

As the library's name implies, only HTTP is supported. No HTTPS.Have a look at

  1. HTTPS #9
  2. HTTPS not supported? #2

@khoih-prog khoih-prog added Support Library support wontfix This will not be worked on labels Aug 29, 2021
@khoih-prog khoih-prog mentioned this issue Sep 3, 2021
@khoih-prog
Copy link
Owner

Hi @jitendra1607

If you're still interested in AsyncHTTPS, Now you can use the new AsyncHTTPSRequest_Generic library

Have a look at AsyncHTTPSRequest_ESP example which is using at AsyncHTTPSRequest_ESP.ino#L107

requestOpenResult = request.open("GET", "https://worldtimeapi.org/api/timezone/America/Toronto.txt");

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Support Library support wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants