Closed DavidAntonin closed 2 years ago
Sorry, everything is OK here.
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
AsyncTCP_SSL v1.1.0
AsyncHTTPSRequest_Generic v1.2.0
Connecting to WiFi SSID: HueNet1
........
AsyncHTTPSRequest @ IP : 192.168.2.105
**************************************
abbreviation: EST
client_ip: aaa.bbb.ccc.ddd
datetime: 2022-01-10T14:07:53.434551-05:00
day_of_week: 1
day_of_year: 10
dst: false
dst_from:
dst_offset: 0
dst_until:
raw_offset: -18000
timezone: America/Toronto
unixtime: 1641841673
utc_datetime: 2022-01-10T19:07:53.434551+00:00
utc_offset: -05:00
week_number: 2
**************************************
You have to specify a lot more information, such as
Please ensure to specify the following:
- Arduino IDE version (e.g. 1.8.19) or Platform.io version
ESP8266
,ESP32
orSTM32
Core Version (e.g. ESP8266 core v3.0.2, ESP32 v2.0.2 or STM32 v2.2.0)- Contextual information (e.g. what you were trying to achieve)
- Simplest possible steps to reproduce
- Anything that might be relevant in your opinion, such as:
- Operating system (Windows, Ubuntu, etc.) and the output of
uname -a
- Network configuration
Please remember next time to follow the instructions in Issue: Bug report, otherwise your post will be deleted right away.
I tried it several times
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
AsyncTCP_SSL v1.1.0
AsyncHTTPSRequest_Generic v1.2.0
Connecting to WiFi SSID: SOSNbk
............
AsyncHTTPSRequest @ IP : 192.168.5.49
HHHHHH
ulr: "https://worldtimeapi.org/api/timezone/America/Toronto.txt" is accesable from web browser without problem - notebook on the same WiFi
Windows 10 64b 21H1
Arduino IDE 1.8.19
ESP32 2.02
Board: ESP32 DEVKIT V1 DOIT
Stock example code - only changed SSID and password
VDSL2 connection 100/25
---------- Původní e-mail ---------- Od: Khoi Hoang @.***> Komu: khoih-prog/AsyncHTTPSRequest_Generic <AsyncHTTPSRequest_Generic@ noreply.github.com> Datum: 10. 1. 2022 20:14:00 Předmět: Re: [khoih-prog/AsyncHTTPSRequest_Generic] empty response (Issue # 3) "
Sorry, everything is OK here.
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
AsyncTCP_SSL v1.1.0
AsyncHTTPSRequest_Generic v1.2.0
Connecting to WiFi SSID: HueNet1
........
AsyncHTTPSRequest @ IP : 192.168.2.105
abbreviation: EST client_ip: 216.154.35.105 datetime: 2022-01-10T14:07:53.434551-05:00 day_of_week: 1 day_of_year: 10 dst: false dst_from: dst_offset: 0 dst_until: raw_offset: -18000 timezone: America/Toronto unixtime: 1641841673 utc_datetime: 2022-01-10T19:07:53.434551+00:00 utc_offset: -05:00 week_number: 2
You have to specify a lot more information, such as " Please ensure to specify the following:
Anything that might be relevant in your opinion, such as:
" Please remember next time to follow the instructions in Issue: Bug report (https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/new?assignees=&labels=&template=bug_report.md&title=) , otherwise your post will be deleted right away.
— Reply to this email directly, view it on GitHub (https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/3#issuecomment-1009259031) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/ALM5VK6S7Q5DKWZR46TDQBDUVMVXBANCNFSM5LT6WYXA) . Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub) . You are receiving this because you authored the thread. Message ID: <khoih- @.***> "
I'm sorry I couldn't duplicate and everything is OK here. You have to check your network / router settings and turn on better debug option to understand what's really happening there.
#define _ASYNC_TCP_SSL_LOGLEVEL_ 4
#define _ASYNC_HTTPS_LOGLEVEL_ 4
I'll investigate only after you'd prove this is a bug of the library.
I now have a functional sending of requests. I found that in order to send another request, I have to wait for the previous one to reply. I have solved this with the request queue and it works reliably. However, the problem occurred when I wanted to send a POST request after a GET request and vice versa. I can send multiple requests of the same type until I send a request of a different type - I get a "Can't send bad request" error (request.open = false)
Hi @DavidAntonin
I'm currently have no time to spend on this issue yet.
Can you try by
then post your test result here.
More to try and digest
As a workaround for the issue, one can add client.setHandshakeTimeout(30); before every connection attempt.
A temporary fix that worked for me was to change line 266 in the ssl_client.cpp (in the WiFiClientSecure library) file from:
if((millis()-handshake_start_time)>ssl_client->handshake_timeout)
to:
if((millis()-handshake_start_time)>(ssl_client->handshake_timeout != 0?ssl_client->handshake_timeout:120000))
(So I manually set a timeout if the handshake_timeout is zero.)
I found that in order to send another request, I have to wait for the previous one to reply.
Check your related issue Pushover https post request #21
I now have a functional sending of requests. I found that in order to send another request, I have to wait for the previous one to reply. I have solved this with the request queue and it works reliably. However, the problem occurred when I wanted to send a POST request after a GET request and vice versa. I can send multiple requests of the same type until I send a request of a different type - I get a "Can't send bad request" error (request.open = false)
Adapt the new example AsyncHTTPSRequest_ESP_Multi of the new AsyncHTTPSRequest_Generic releases v1.4.1
In the current design, each AsyncHTTPSRequest instance can only be use for one address and one type of request (GET, POST, etc,).
It's more complex to completely rewrite the library, than to write the code using multiple instances.
So I don't think I'll spend the time to fix the library in the near future.
Good Luck,
Hi @khoih-prog Thank you four your time and example. I will adot it to my program Have a nice day
I filled up my wifi ssid/pass in example but I did not get response, only: