Skip to content

Commit

Permalink
Drop proxies parameter from the high level API (#485)
Browse files Browse the repository at this point in the history
* Drop `proxies` argument from high level API

* Update state of Digest auth in docs

* Add note on not supporting proxies at request level

* Grammar tweak

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
  • Loading branch information
yeraydiazdiaz and florimondmanca committed Oct 19, 2019
1 parent 074cd25 commit 09db6ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ with httpx.Client(proxies=proxy) as client:
r = client.get("http://example.com")
```

!!! note

Per request proxy configuration, i.e. `client.get(url, proxies=...)`,
has not been implemented yet. To use proxies you must pass the proxy
information at `Client` initialization.

## Timeout fine-tuning
HTTPX offers various request timeout management options. Three types of timeouts are available: **connect** timeouts,
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Plus all the standard features of `requests`...
* Keep-Alive & Connection Pooling
* Sessions with Cookie Persistence
* Browser-style SSL Verification
* Basic/Digest Authentication *(Digest is still TODO)*
* Basic/Digest Authentication
* Elegant Key/Value Cookies
* Automatic Decompression
* Automatic Content Decoding
Expand Down
9 changes: 0 additions & 9 deletions httpx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
AuthTypes,
CookieTypes,
HeaderTypes,
ProxiesTypes,
QueryParamTypes,
RequestData,
RequestFiles,
Expand All @@ -32,7 +31,6 @@ def request(
verify: VerifyTypes = True,
stream: bool = False,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
with Client(http_versions=["HTTP/1.1"]) as client:
return client.request(
Expand Down Expand Up @@ -67,7 +65,6 @@ def get(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"GET",
Expand Down Expand Up @@ -98,7 +95,6 @@ def options(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"OPTIONS",
Expand Down Expand Up @@ -129,7 +125,6 @@ def head(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"HEAD",
Expand Down Expand Up @@ -163,7 +158,6 @@ def post(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"POST",
Expand Down Expand Up @@ -200,7 +194,6 @@ def put(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"PUT",
Expand Down Expand Up @@ -237,7 +230,6 @@ def patch(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"PATCH",
Expand Down Expand Up @@ -271,7 +263,6 @@ def delete(
verify: VerifyTypes = True,
timeout: TimeoutTypes = None,
trust_env: bool = None,
proxies: ProxiesTypes = None,
) -> Response:
return request(
"DELETE",
Expand Down

0 comments on commit 09db6ec

Please sign in to comment.