From 00828867cbd37b2f5ad6d442e9e470deb1cbad18 Mon Sep 17 00:00:00 2001 From: Matus Valo Date: Mon, 24 Feb 2025 23:13:41 +0000 Subject: [PATCH 1/3] Docs: Add `httpx.Proxy` to api.md --- docs/api.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/api.md b/docs/api.md index d01cc649ba..594c945893 100644 --- a/docs/api.md +++ b/docs/api.md @@ -159,3 +159,18 @@ what gets sent over the wire.* * `def delete(name, [domain], [path])` * `def clear([domain], [path])` * *Standard mutable mapping interface* + +## `Proxy` + +*A configuration of the proxy server* + +```pycon +>>> proxy = Proxy("http://proxy.example.com") +>>> client = Client(proxy=proxy) +``` + +* `def __init__(url, [ssl_context], [auth], [headers])` +* `.url` - **URL** +* `.auth` - **tuple[str, str]** +* `.headers` - **Headers** +* `.ssl_context` - **SSLContext** From 3c350806cdce993b8c1337fc76854387d0ea29ac Mon Sep 17 00:00:00 2001 From: Matus Valo Date: Mon, 24 Feb 2025 23:28:06 +0000 Subject: [PATCH 2/3] Cosmetics --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 594c945893..2fad80d1b2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -162,7 +162,7 @@ what gets sent over the wire.* ## `Proxy` -*A configuration of the proxy server* +*A configuration of the proxy server.* ```pycon >>> proxy = Proxy("http://proxy.example.com") From 141afdd8d2c907edf7fd1a95dd7aff90f0106b9e Mon Sep 17 00:00:00 2001 From: Matus Valo Date: Mon, 24 Feb 2025 23:29:57 +0000 Subject: [PATCH 3/3] Add port number to proxy url --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 2fad80d1b2..f1bd50c993 100644 --- a/docs/api.md +++ b/docs/api.md @@ -165,7 +165,7 @@ what gets sent over the wire.* *A configuration of the proxy server.* ```pycon ->>> proxy = Proxy("http://proxy.example.com") +>>> proxy = Proxy("http://proxy.example.com:8030") >>> client = Client(proxy=proxy) ```