Skip to content
Myr

Add Unix Domain Sockets section to advanced docs page (#542)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jonas Lundberg · committed by Florimond Manca · parent 7a96a2c · Browse files · 1 file+15 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+15 added−0 removed

  • other:+15 added−0 removed

1 file+15 added−0 removed

modified:docs/advanced.md+15 added
177 unmodified lines
178179...180```181182## Unix Domain Sockets183184You can configure an `httpx` client to connect through a unix domain socket via the `uds` parameter. This is useful when making requests to a server that is bound to a socket file rather than an IP address.185186Here's an example requesting the Docker Engine API:187188```python189import httpx190191192with httpx.Client(uds="/var/run/docker.sock") as client:193 # This request will connect through the socket file.194 resp = client.get("http://localhost/version")195```196197## HTTP Proxying198199HTTPX supports setting up proxies the same way that Requests does via the `proxies` parameter.200For example to forward all HTTP traffic to `http://127.0.0.1:3080` and all HTTPS traffic
214 unmodified lines