adafruit / adafruit/Adafruit_CircuitPython_Requests

Connection failure when using non-standard HTTP port

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
49
Forks
39
PR merge metrics
No merged PRs in 30d

Description

To start, I'm using this library along with the `adafruit_espatcontrol` library. When using a URL such as `http://example.com:8000/`, the error `RuntimeError: Connection type must be TCP, UDL or SSL` is raised.

I think this happens because the `conntype` parameter is left empty during the `_get_socket` call, which results in the socket determining the type of the connection based on the port alone.

Since this library knows whether the request is using HTTP or HTTPS, maybe the `conntype` can be passed directly to the function based on that. ~Unfortunately, the `adafruit_esp32spi` library seems to use a completely different way of describing the `conntype`, which might make passing it problematic.~

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.