parent
bd8165a1b1
commit
924fa8c9dc
@ -31,18 +31,21 @@
|
||||
|
||||
::: httpx.delete
|
||||
:docstring:
|
||||
|
||||
::: httpx.stream
|
||||
:docstring:
|
||||
|
||||
## `Client`
|
||||
|
||||
::: httpx.Client
|
||||
:docstring:
|
||||
:members: headers cookies params auth request get head options post put patch delete build_request send close
|
||||
:members: headers cookies params auth request get head options post put patch delete stream build_request send close
|
||||
|
||||
## `AsyncClient`
|
||||
|
||||
::: httpx.AsyncClient
|
||||
:docstring:
|
||||
:members: headers cookies params auth request get head options post put patch delete build_request send aclose
|
||||
:members: headers cookies params auth request get head options post put patch delete stream build_request send aclose
|
||||
|
||||
|
||||
## `Response`
|
||||
|
||||
@ -118,6 +118,16 @@ def stream(
|
||||
cert: CertTypes = None,
|
||||
trust_env: bool = True,
|
||||
) -> StreamContextManager:
|
||||
"""
|
||||
Alternative to `httpx.request()` that streams the response body
|
||||
instead of loading it into memory at once.
|
||||
|
||||
**Parameters**: See `httpx.request`.
|
||||
|
||||
See also: [Streaming Responses][0]
|
||||
|
||||
[0]: /quickstart#streaming-responses
|
||||
"""
|
||||
client = Client(proxies=proxies, cert=cert, verify=verify, trust_env=trust_env)
|
||||
request = Request(
|
||||
method=method,
|
||||
|
||||
@ -191,6 +191,16 @@ class BaseClient:
|
||||
allow_redirects: bool = True,
|
||||
timeout: typing.Union[TimeoutTypes, UnsetType] = UNSET,
|
||||
) -> "StreamContextManager":
|
||||
"""
|
||||
Alternative to `httpx.request()` that streams the response body
|
||||
instead of loading it into memory at once.
|
||||
|
||||
**Parameters**: See `httpx.request`.
|
||||
|
||||
See also: [Streaming Responses][0]
|
||||
|
||||
[0]: /quickstart#streaming-responses
|
||||
"""
|
||||
request = self.build_request(
|
||||
method=method,
|
||||
url=url,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user