HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/self/root/usr/local/lib/python3.10/dist-packages/httpx/__pycache__/_api.cpython-310.pyc
o

���g�-�@s�ddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZdd	lmZejrEddlZgd
�Zdddddddddedddd
�
dCd-d.�Zedddddddddedddd
�
dDd0d1��Zdddddddedd2�	dEd3d4�Zdddddddedd2�	dEd5d6�Zdddddddedd2�	dEd7d8�Zdddddddddddedd9�
dFd:d;�Zdddddddddddedd9�
dFd<d=�Z dddddddddddedd9�
dFd>d?�Z!ddddddeddd@�	dGdAdB�Z"dS)H�)�annotationsN)�contextmanager�)�Client)�DEFAULT_TIMEOUT_CONFIG)�Response)	�	AuthTypes�CookieTypes�HeaderTypes�
ProxyTypes�QueryParamTypes�RequestContent�RequestData�RequestFiles�TimeoutTypes)�URL)	�delete�get�head�options�patch�post�put�request�streamFT)
�params�content�data�files�json�headers�cookies�auth�proxy�timeout�follow_redirects�verify�	trust_env�method�str�url�	URL | strr�QueryParamTypes | Noner�RequestContent | Noner�RequestData | Noner�RequestFiles | Noner�typing.Any | Noner �HeaderTypes | Noner!�CookieTypes | Noner"�AuthTypes | Noner#�ProxyTypes | Noner$rr%�boolr&�ssl.SSLContext | str | boolr'�returnrc

CsTt||
|
||d��}|j|||||||||	|d�
Wd�S1s#wYdS)a
    Sends an HTTP request.

    **Parameters:**

    * **method** - HTTP method for the new `Request` object: `GET`, `OPTIONS`,
    `HEAD`, `POST`, `PUT`, `PATCH`, or `DELETE`.
    * **url** - URL for the new `Request` object.
    * **params** - *(optional)* Query parameters to include in the URL, as a
    string, dictionary, or sequence of two-tuples.
    * **content** - *(optional)* Binary content to include in the body of the
    request, as bytes or a byte iterator.
    * **data** - *(optional)* Form data to include in the body of the request,
    as a dictionary.
    * **files** - *(optional)* A dictionary of upload files to include in the
    body of the request.
    * **json** - *(optional)* A JSON serializable object to include in the body
    of the request.
    * **headers** - *(optional)* Dictionary of HTTP headers to include in the
    request.
    * **cookies** - *(optional)* Dictionary of Cookie items to include in the
    request.
    * **auth** - *(optional)* An authentication class to use when sending the
    request.
    * **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    the request.
    * **follow_redirects** - *(optional)* Enables or disables HTTP redirects.
    * **verify** - *(optional)* Either `True` to use an SSL context with the
    default CA bundle, `False` to disable verification, or an instance of
    `ssl.SSLContext` to use a custom context.
    * **trust_env** - *(optional)* Enables or disables usage of environment
    variables for configuration.

    **Returns:** `Response`

    Usage:

    ```
    >>> import httpx
    >>> response = httpx.request('GET', 'https://httpbin.org/get')
    >>> response
    <Response [200 OK]>
    ```
    �r!r#r&r$r'�
r(r*rrrrrr r"r%N)rr)r(r*rrrrrr r!r"r#r$r%r&r'�client�r;�5/usr/local/lib/python3.10/dist-packages/httpx/_api.pyr's*?��$�r�typing.Iterator[Response]c

cs��t||
|
||d��3}|j|||||||||	|d�
�}|VWd�n1s(wYWd�dSWd�dS1s@wYdS)z�
    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
    r8r9N)rr)r(r*rrrrrr r!r"r#r$r%r&r'r:�responser;r;r<r{s6�����"�r�	rr r!r"r#r%r&r$r'c	

C�td||||||||||	d�S)z�
    Sends a `GET` request.

    **Parameters**: See `httpx.request`.

    Note that the `data`, `files`, `json` and `content` parameters are not available
    on this function, as `GET` requests should not include a request body.
    �GETr?�r�
r*rr r!r"r#r%r&r$r'r;r;r<r���rc	

Cr@)z�
    Sends an `OPTIONS` request.

    **Parameters**: See `httpx.request`.

    Note that the `data`, `files`, `json` and `content` parameters are not available
    on this function, as `OPTIONS` requests should not include a request body.
    �OPTIONSr?rBrCr;r;r<r�rDrc	

Cr@)z�
    Sends a `HEAD` request.

    **Parameters**: See `httpx.request`.

    Note that the `data`, `files`, `json` and `content` parameters are not available
    on this function, as `HEAD` requests should not include a request body.
    �HEADr?rBrCr;r;r<r�rDr�
rrrrrr r!r"r#r%r&r$r'c
C�&td||||||||||	|
|||
d�S)zK
    Sends a `POST` request.

    **Parameters**: See `httpx.request`.
    �POSTrGrB�r*rrrrrr r!r"r#r%r&r$r'r;r;r<r�"�rc
CrH)zJ
    Sends a `PUT` request.

    **Parameters**: See `httpx.request`.
    �PUTrGrBrJr;r;r<rCrKrc
CrH)zL
    Sends a `PATCH` request.

    **Parameters**: See `httpx.request`.
    �PATCHrGrBrJr;r;r<rlrKr)	rr r!r"r#r%r$r&r'c	

Cstd||||||||||	d�S)z�
    Sends a `DELETE` request.

    **Parameters**: See `httpx.request`.

    Note that the `data`, `files`, `json` and `content` parameters are not available
    on this function, as `DELETE` requests should not include a request body.
    �DELETEr?rB)
r*rr r!r"r#r%r$r&r'r;r;r<r�rDr) r(r)r*r+rr,rr-rr.rr/rr0r r1r!r2r"r3r#r4r$rr%r5r&r6r'r5r7r) r(r)r*r+rr,rr-rr.rr/rr0r r1r!r2r"r3r#r4r$rr%r5r&r6r'r5r7r=)r*r+rr,r r1r!r2r"r3r#r4r%r5r&r6r$rr'r5r7r)r*r+rr-rr.rr/rr0rr,r r1r!r2r"r3r#r4r%r5r&r6r$rr'r5r7r)r*r+rr,r r1r!r2r"r3r#r4r%r5r$rr&r6r'r5r7r)#�
__future__r�typing�
contextlibr�_clientr�_configr�_modelsr�_typesrr	r
rrr
rrr�_urlsr�
TYPE_CHECKING�ssl�__all__rrrrrrrrrr;r;r;r<�<module>s�,�T�5�'�'�'�,�,�,�