
    Ng3                        d dl mZ d dlZd dlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZmZmZmZmZmZmZmZmZmZmZmZ dd	lmZ g d
Zddddddddddedddddd=d1Zeddddddddddedddddd>d3            Zdddddddddedd4d?d5Zdddddddddedd4d?d6Zdddddddddedd4d?d7Zdddddddddddddedd8d@d9Z dddddddddddddedd8d@d:Z!dddddddddddddedd8d@d;Z"dddddddddedd4d?d<Z#dS )A    )annotationsN)contextmanager   )Client)DEFAULT_TIMEOUT_CONFIG)Response)	AuthTypes	CertTypesCookieTypesHeaderTypesProxiesTypes
ProxyTypesQueryParamTypesRequestContentRequestDataRequestFilesTimeoutTypesVerifyTypes)URL)	deletegetheadoptionspatchpostputrequeststreamFT)paramscontentdatafilesjsonheaderscookiesauthproxyproxiestimeoutfollow_redirectsverifycert	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(   ProxiesTypes | Noner)   r   r*   boolr+   r   r,   CertTypes | Noner-   returnr   c                   t          ||
|||||          5 }|                    | ||||||||	|
  
        cddd           S # 1 swxY w Y   dS )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.
    * **proxies** - *(optional)* A dictionary mapping proxy keys to proxy URLs.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    the request.
    * **follow_redirects** - *(optional)* Enables or disables HTTP redirects.
    * **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
    verify the identity of requested hosts. Either `True` (default CA bundle),
    a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
    (which will disable verification).
    * **cert** - *(optional)* An SSL certificate used by the requested host
    to authenticate the client. Either a path to an SSL certificate file, or
    two-tuple of (certificate file, key file), or a three-tuple of (certificate
    file, key file, password).
    * **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-   
r.   r0   r    r!   r"   r#   r   r$   r&   r*   N)r   r   )r.   r0   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   clients                     F/var/www/html/ai-engine/env/lib/python3.11/site-packages/httpx/_api.pyr   r   &   s    N 

 
 
 
 
~~-  
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   AA
Atyping.Iterator[Response]c             #     K   t          ||
|||||          5 }|                    | ||||||||	|
  
        5 }|V  ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )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
    r@   rA   N)r   r   )r.   r0   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   rB   responses                      rC   r   r      s+     > 

 
 
  
]]-  
 
 	 NNN	 	 	 	 	 	 	 	 	 	 	 	 	 	 	                 s3    A"A
A"
A	A"A	A""A&)A&r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   c               :    t          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.
    GETrG   r   r0   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   s               rC   r   r      sB    . )       c               :    t          d| |||||||||	|
|          S )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.
    OPTIONSrG   rJ   rK   s               rC   r   r      sB    . )   rL   c               :    t          d| |||||||||	|
|          S )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.
    HEADrG   rJ   rK   s               rC   r   r     sB    . )   rL   r    r!   r"   r#   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   c               :    t          d| f|||||||||	|
|||||dS )zK
    Sends a `POST` request.

    **Parameters**: See `httpx.request`.
    POSTrQ   rJ   r0   r    r!   r"   r#   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   s                   rC   r   r   3  sU    0  )#   rL   c               :    t          d| f|||||||||	|
|||||dS )zJ
    Sends a `PUT` request.

    **Parameters**: See `httpx.request`.
    PUTrQ   rJ   rT   s                   rC   r   r   `  sU    0  )#   rL   c               :    t          d| f|||||||||	|
|||||dS )zL
    Sends a `PATCH` request.

    **Parameters**: See `httpx.request`.
    PATCHrQ   rJ   rT   s                   rC   r   r     sU    0  )#   rL   c               :    t          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.
    DELETErG   rJ   rK   s               rC   r   r     sB    . )   rL   )$r.   r/   r0   r1   r   r2   r    r3   r!   r4   r"   r5   r#   r6   r$   r7   r%   r8   r&   r9   r'   r:   r(   r;   r)   r   r*   r<   r+   r   r,   r=   r-   r<   r>   r   )$r.   r/   r0   r1   r   r2   r    r3   r!   r4   r"   r5   r#   r6   r$   r7   r%   r8   r&   r9   r'   r:   r(   r;   r)   r   r*   r<   r+   r   r,   r=   r-   r<   r>   rD   )r0   r1   r   r2   r$   r7   r%   r8   r&   r9   r'   r:   r(   r;   r*   r<   r,   r=   r+   r   r)   r   r-   r<   r>   r   )"r0   r1   r    r3   r!   r4   r"   r5   r#   r6   r   r2   r$   r7   r%   r8   r&   r9   r'   r:   r(   r;   r*   r<   r,   r=   r+   r   r)   r   r-   r<   r>   r   )$
__future__r   typing
contextlibr   _clientr   _configr   _modelsr   _typesr	   r
   r   r   r   r   r   r   r   r   r   r   _urlsr   __all__r   r   r   r   r   r   r   r   r    rL   rC   <module>re      s   " " " " " "  % % % % % %       + + + + + +                                       
 
 
" &*%)#!%""&"&!##'2"!%[
 [
 [
 [
 [
 [
| 
 &*%)#!%""&"&!##'2"!%3 3 3 3 3 3r &*"&"&!##'"!2% % % % % %V &*"&"&!##'"!2% % % % % %V &*"&"&!##'"!2% % % % % %V &*#!%"%)"&"&!##'"!2#* * * * * *` &*#!%"%)"&"&!##'"!2#* * * * * *` &*#!%"%)"&"&!##'"!2#* * * * * *` &*"&"&!##'"!2% % % % % % % %rL   