Skip to content
Myr

docs: Fix proxy examples (#2183)

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

Per https://www.python-httpx.org/compatibility/#proxy-keys, there should always be a `://` after the protocol. The given examples raise an exception when used as-is.

authored by nyuszika7h · committed by GitHub · parent 8bdd673 · Browse files · 2 files+5 added−5 removed
This commit

State

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

Trailers

  • Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

2 files+5 added−5 removed

  • other:+5 added−5 removed

2 files+5 added−5 removed

modified:docs/contributing.md+1 added-1 removed
211 unmodified lines
212213```214import httpx215216proxies = {"all": "http://127.0.0.1:8080/"}216proxies = {"all://": "http://127.0.0.1:8080/"}217218with httpx.Client(proxies=proxies, verify="/path/to/client.pem") as client:219 response = client.get("https://example.org")220 print(response.status_code) # should print 200
17 unmodified lines
modified:docs/troubleshooting.md+4 added-4 removed