Getting the above error:
Adafruit CircuitPython 7.3.2 on 2022-07-20; Adafruit QT Py ESP32S2 with ESP32S2
[...]
>>> adafruit_requests.__version__
'1.12.4'
>>> response = requests.get("https://www.flightstats.com")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_requests.py", line 726, in get
File "adafruit_requests.py", line 667, in request
File "adafruit_requests.py", line 518, in _get_socket
RuntimeError: Sending request failed
I've seen this reported a few times, but I'm still not clear on which library, exactly, is failing and where to look for an update that fixes it.
Here's what curl -v reports for flightstats.com:
* Connected to www.flightstats.com (54.208.3.224) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [64 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [3388 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: CN=flightstats.com; O=LNRS Data Services Ltd; L=Sutton; ST=Surrey; C=GB
* start date: Jun 14 07:10:36 2022 GMT
* expire date: Jun 14 07:09:36 2023 GMT
* subjectAltName: host "www.flightstats.com" matched cert's "www.flightstats.com"
* issuer: C=US; ST=Illinois; L=Chicago; O=Trustwave Holdings, Inc.; CN=Trustwave Organization Validation SHA256 CA, Level 1; emailAddress=ca@trustwave.com
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
Is the problem the size of the certificate? The encoding? I wish I knew where to look.