o
    Eh(                     @   s  d dl Z ddlmZmZ ddlmZ ddlmZ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 dddddddedddddd	ed
edededede jdedede
dedededededefddZdddddddedddddd	ed
edededede jdedede
dedededededefddZdddddddedd	d
edededede
dedededededefddZdddddddedd	d
edededede
dedededededefdd Zddddd!ddedd	d
edededede
dedededededefd"d#Zddddddddddedd$d
ededede jdededede
dedededededefd%d&Zddddddddddedd$d
ededede jdededede
dedededededefd'd(Zddddddddddedd$d
ededede jdededede
dedededededefd)d*Zdddddddedd	d
edededede
dedededededefd+d,ZdS )-    N   )ClientStreamContextManager)DEFAULT_TIMEOUT_CONFIG)RequestResponse)
	AuthTypes	CertTypesCookieTypesHeaderTypesQueryParamTypesRequestDataRequestFilesTimeoutTypesURLTypesVerifyTypesT)paramsdatafilesjsonheaderscookiesauthtimeoutallow_redirectsverifycert	trust_envmethodurlr   r   r   r   r   r   r   r   r   r   r   r   returnc                C   sR   t |||	|d}|j| |||||||||
d
W  d   S 1 s"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 list of two-tuples.
    * **data** - *(optional)* 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.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    the request.
    * **allow_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, or `False` (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   r   r   r   r   r   r   N)r   request)r   r   r   r   r   r   r   r   r   r   r   r   r   r   client r#   E/var/www/html/env_mimamsha/lib/python3.10/site-packages/httpx/_api.pyr!      s"   ?$r!   c             
   C   s:   t |||d}t| |||||||d}t||||	|
ddS )N)r   r   r   )r   r   r   r   r   r   r   r   T)r"   r!   r   r   r   close_client)r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r"   r!   r#   r#   r$   streamd   s&   
r&   	r   r   r   r   r   r   r   r   r   c       	   
      C      t d| |||||||||	dS )z
    Sends a `GET` request.

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

    Note that the `data`, `files`, and `json` parameters are not available on
    this function, as `GET` requests should not include a request body.
    GETr'   r!   
r   r   r   r   r   r   r   r   r   r   r#   r#   r$   get      r,   c       	   
      C   r(   )z
    Sends an `OPTIONS` request.

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

    Note that the `data`, `files`, and `json` parameters are not available on
    this function, as `OPTIONS` requests should not include a request body.
    OPTIONSr'   r*   r+   r#   r#   r$   options   r-   r/   Fc       	   
      C   r(   )aN  
    Sends a `HEAD` request.

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

    Note that the `data`, `files`, and `json` parameters are not available on
    this function, as `HEAD` requests should not include a request body. The
    `HEAD` method also differs from the other cases in that `allow_redirects`
    defaults to `False`.
    HEADr'   r*   r+   r#   r#   r$   head   s   r1   r   r   r   r   r   r   r   r   r   r   r   r   c                C   $   t d| |||||||||	|
||dS )zK
    Sends a `POST` request.

    **Parameters**: See `httpx.request`.
    POSTr2   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r#   r#   r$   post       r6   c                C   r3   )zJ
    Sends a `PUT` request.

    **Parameters**: See `httpx.request`.
    PUTr2   r*   r5   r#   r#   r$   put  r7   r9   c                C   r3   )zL
    Sends a `PATCH` request.

    **Parameters**: See `httpx.request`.
    PATCHr2   r*   r5   r#   r#   r$   patchF  r7   r;   c       	   
      C   r(   )z
    Sends a `DELETE` request.

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

    Note that the `data`, `files`, and `json` parameters are not available on
    this function, as `DELETE` requests should not include a request body.
    DELETEr'   r*   r+   r#   r#   r$   deletem  r-   r=   ) typing_clientr   r   _configr   _modelsr   r   _typesr   r	   r
   r   r   r   r   r   r   r   strAnyboolr!   r&   r,   r/   r1   r6   r9   r;   r=   r#   r#   r#   r$   <module>   s   0	

T	

)	

'	

'	

)	

*	

*	

*	
