An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc. It can be shared between threads. Usage: ```python >>> client = httpx.Client() >>> response = client.get('https://example.org') ``` **Parameters:** * **auth** - *(optional)*
| 592 | |
| 593 | |
| 594 | class Client(BaseClient): |
| 595 | """ |
| 596 | An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc. |
| 597 | |
| 598 | It can be shared between threads. |
| 599 | |
| 600 | Usage: |
| 601 | |
| 602 | ```python |
| 603 | >>> client = httpx.Client() |
| 604 | >>> response = client.get('https://example.org') |
| 605 | ``` |
| 606 | |
| 607 | **Parameters:** |
| 608 | |
| 609 | * **auth** - *(optional)* An authentication class to use when sending |
| 610 | requests. |
| 611 | * **params** - *(optional)* Query parameters to include in request URLs, as |
| 612 | a string, dictionary, or sequence of two-tuples. |
| 613 | * **headers** - *(optional)* Dictionary of HTTP headers to include when |
| 614 | sending requests. |
| 615 | * **cookies** - *(optional)* Dictionary of Cookie items to include when |
| 616 | sending requests. |
| 617 | * **verify** - *(optional)* Either `True` to use an SSL context with the |
| 618 | default CA bundle, `False` to disable verification, or an instance of |
| 619 | `ssl.SSLContext` to use a custom context. |
| 620 | * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be |
| 621 | enabled. Defaults to `False`. |
| 622 | * **proxy** - *(optional)* A proxy URL where all the traffic should be routed. |
| 623 | * **timeout** - *(optional)* The timeout configuration to use when sending |
| 624 | requests. |
| 625 | * **limits** - *(optional)* The limits configuration to use. |
| 626 | * **max_redirects** - *(optional)* The maximum number of redirect responses |
| 627 | that should be followed. |
| 628 | * **base_url** - *(optional)* A URL to use as the base when building |
| 629 | request URLs. |
| 630 | * **transport** - *(optional)* A transport class to use for sending requests |
| 631 | over the network. |
| 632 | * **trust_env** - *(optional)* Enables or disables usage of environment |
| 633 | variables for configuration. |
| 634 | * **default_encoding** - *(optional)* The default encoding to use for decoding |
| 635 | response text, if no charset information is included in a response Content-Type |
| 636 | header. Set to a callable for automatic character set detection. Default: "utf-8". |
| 637 | """ |
| 638 | |
| 639 | def __init__( |
| 640 | self, |
| 641 | *, |
| 642 | auth: AuthTypes | None = None, |
| 643 | params: QueryParamTypes | None = None, |
| 644 | headers: HeaderTypes | None = None, |
| 645 | cookies: CookieTypes | None = None, |
| 646 | verify: ssl.SSLContext | str | bool = True, |
| 647 | cert: CertTypes | None = None, |
| 648 | trust_env: bool = True, |
| 649 | http1: bool = True, |
| 650 | http2: bool = False, |
| 651 | proxy: ProxyTypes | None = None, |