-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
Is your feature request related to a problem?
- The docs mention briefly how to connect to a server using unix domain dockets but there's no example of how a valid url should look like. In other words, given
aiohttp.UnixConnector(path='/path/to/socket')
, what's the equivalent url of http://httpbin.org/get?
After some trial and error, here's what doesn't work and what does:
- ❌
get
:InvalidUrlClientError
- ❌
/get
:InvalidUrlClientError
- ❌
///get
:InvalidUrlClientError
- ❌
//get
: 404 not found - the server receives/
- ❌ All the above prepended by explicit
unix:
scheme - ✅
//localhost/get
(andunix://localhost/get
): works - ✅
//can-be-anything:12345/get
: works but should it? Apparently host/port are ignored but they're still required.
- After eventually finding a url that works, I tried to set a base_url to
unix://localhost
(orunix://localhost/
) so that I can pass just the relative url (get
). Sadly this also raisesInvalidUrlClientError
Describe the solution you'd like
- Extend the documentation to show valid unix domain socket urls look like
- Support
base_url
for unix domain sockets
Related component
Client
Code of Conduct
- I agree to follow the aio-libs Code of Conduct