Skip to content
Myr

Add client.request

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

authored by Tom Christie · committed by Tom Christie · parent be77498 · Browse files · 3 files+25 added−1 removed
This commit

State

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

Diff stats

3 files+25 added−1 removed

  • other:+25 added−1 removed

3 files+25 added−1 removed

modified:httpcore/connections.py+1 added
38 unmodified lines
3940 async def send(41 self,42 request: Request,43 *,44 ssl: typing.Optional[SSLConfig] = None,45 timeout: typing.Optional[TimeoutConfig] = None,46 stream: bool = False,47 ) -> Response:
126 unmodified lines
modified:httpcore/datastructures.py+23 added-1 removed
1import http2import typing3from urllib.parse import urlsplit45from .config import SSLConfig, TimeoutConfig6from .decoders import (7 ACCEPT_ENCODING,8 SUPPORTED_DECODERS,9 Decoder,
228 unmodified lines
238 await self.on_close()239240241class Client:241 async def send(self, request: Request, **options: typing.Any) -> Response:242 async def request(243 self,244 method: str,245 url: typing.Union[str, URL],246 *,247 headers: typing.Sequence[typing.Tuple[bytes, bytes]] = (),248 body: typing.Union[bytes, typing.AsyncIterator[bytes]] = b"",249 ssl: typing.Optional[SSLConfig] = None,250 timeout: typing.Optional[TimeoutConfig] = None,251 stream: bool = False,252 ) -> Response:253 request = Request(method, url, headers=headers, body=body)254 return await self.send(request, ssl=ssl, timeout=timeout, stream=stream)255256 async def send(257 self,258 request: Request,259 *,260 ssl: typing.Optional[SSLConfig] = None,261 timeout: typing.Optional[TimeoutConfig] = None,262 stream: bool = False,263 ) -> Response:264 raise NotImplementedError() # pragma: nocover265266 async def close(self) -> None:267 raise NotImplementedError() # pragma: nocover
modified:httpcore/pool.py+1 added
52 unmodified lines
5354 async def send(55 self,56 request: Request,57 *,58 ssl: typing.Optional[SSLConfig] = None,59 timeout: typing.Optional[TimeoutConfig] = None,60 stream: bool = False,61 ) -> Response:
72 unmodified lines