
    tcE                    @   d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ ddl	m	Z	 ddl
mZmZmZ ddlmZmZmZmZmZmZ ddlmZ dd	lmZmZmZmZ dd
lmZmZmZm Z  ddl!m"Z" ddl#m$Z$ ddl%m&Z&m'Z' ddl(m)Z)m*Z* ddl+m,Z, ddl-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z< ddl=m>Z>m?Z? ddl@mAZAmBZBmCZCmDZDmEZEmFZFmGZG  ejH        dd          ZI ejH        dd          ZJ G d d          ZK eK            ZL eEeM          ZNde	 ZOdP                    d  ejQ                    D                       ZR G d dejS                  ZT G d d e9          ZU G d! d"e.          ZVejW        d#ejX        f         ZY G d$ d%          ZZ G d& deZ          Z[ G d' deZ          Z\dS )(    N)asynccontextmanagercontextmanager)TracebackType   )__version__)Auth	BasicAuthFunctionAuth)DEFAULT_LIMITSDEFAULT_MAX_REDIRECTSDEFAULT_TIMEOUT_CONFIGLimitsProxyTimeout)SUPPORTED_DECODERS)
InvalidURLRemoteProtocolErrorTooManyRedirectsrequest_context)CookiesHeadersRequestResponse)codes)ASGITransport)AsyncBaseTransportBaseTransport)AsyncHTTPTransportHTTPTransport)WSGITransport)AsyncByteStream	AuthTypes	CertTypesCookieTypesHeaderTypesProxiesTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesSyncByteStreamTimeoutTypesURLTypesVerifyTypes)URLQueryParams)	NetRCInfoTimer
URLPatternget_environment_proxies
get_loggeris_https_redirectsame_originTClient)boundUAsyncClientc                       e Zd ZdZdS )UseClientDefaulta<  
    For some parameters such as `auth=...` and `timeout=...` we need to be able
    to indicate the default "unset" state, in a way that is distinctly different
    to using `None`.

    The default "unset" state indicates that whatever default is set on the
    client should be used. This is different to setting `None`, which
    explicitly disables the parameter, possibly overriding a client default.

    For example we use `timeout=USE_CLIENT_DEFAULT` in the `request()` signature.
    Omitting the `timeout` parameter will send a request using whatever default
    timeout has been configured on the client. Including `timeout=None` will
    ensure no timeout is used.

    Note that user code shouldn't need to use the `USE_CLIENT_DEFAULT` constant,
    but it is used internally when a parameter is not included.
    N)__name__
__module____qualname____doc__     //usr/lib/python3/dist-packages/httpx/_client.pyr?   r?   A   s           rE   r?   zpython-httpx/z, c                     g | ]
}|d k    |S )identityrD   ).0keys     rF   
<listcomp>rK   \   s"    CCCS
1B1BS1B1B1BrE   c                       e Zd ZdZdZdZdS )ClientStater         N)r@   rA   rB   UNOPENEDOPENEDCLOSEDrD   rE   rF   rM   rM   `   s#         H F FFFrE   rM   c                   T    e Zd ZdZdedededdfdZdej	        e
         fdZd
d	ZdS )BoundSyncStreamz
    A byte stream that is bound to a given response instance, and that
    ensures the `response.elapsed` is set once the response is closed.
    streamresponsetimerreturnNc                 0    || _         || _        || _        d S N_stream	_response_timerselfrU   rV   rW   s       rF   __init__zBoundSyncStream.__init__t        !rE   c              #   &   K   | j         D ]}|V  d S rZ   r\   r`   chunks     rF   __iter__zBoundSyncStream.__iter__{   s,      \ 	 	EKKKK	 	rE   c                     | j                                         }t          j        |          | j        _        | j                                         d S N)seconds)r^   sync_elapseddatetime	timedeltar]   elapsedr\   closer`   rj   s     rF   ro   zBoundSyncStream.close   sG    +**,,!)!3G!D!D!DrE   rX   N)r@   rA   rB   rC   r,   r   r3   ra   typingIteratorbytesrg   ro   rD   rE   rF   rT   rT   n   s         
$08AF	   &/%0         rE   rT   c                   T    e Zd ZdZdedededdfdZdej	        e
         fdZd
d	ZdS )BoundAsyncStreamz
    An async byte stream that is bound to a given response instance, and that
    ensures the `response.elapsed` is set once the response is closed.
    rU   rV   rW   rX   Nc                 0    || _         || _        || _        d S rZ   r[   r_   s       rF   ra   zBoundAsyncStream.__init__   rb   rE   c                4   K   | j         2 3 d {V }|W V  6 d S rZ   rd   re   s     rF   	__aiter__zBoundAsyncStream.__aiter__   sF      < 	 	 	 	 	 	 	%KKKKK (<<s   c                    K   | j                                          d {V }t          j        |          | j        _        | j                                         d {V  d S ri   )r^   async_elapsedrl   rm   r]   rn   r\   acloserp   s     rF   r|   zBoundAsyncStream.aclose   so      1133333333!)!3G!D!D!Dl!!###########rE   rq   )r@   rA   rB   rC   r!   r   r3   ra   rr   AsyncIteratorrt   ry   r|   rD   rE   rF   rv   rv      s         
%19BG	   !5e!<    $ $ $ $ $ $rE   rv   .c                   ,   e Zd Zddddededdddddej        e         dej        e         d	ej        e	         d
ej        e
         dedededej        ej        eej        e         f                  dededej        eej        egef         f         fdZedefd            Zedefd            ZdedefdZdej        e         dedej        eej        e         f         fdZede fd            Z!e!j"        deddfd            Z!edej        eej        e         f         fd            Z#e#j"        dej        eej        e         f         ddfd            Z#edej        e$         fd            Z%e%j"        deddfd             Z%edefd!            Z&e&j"        deddfd"            Z&ede'fd#            Z(e(j"        d	e	ddfd$            Z(ede)fd%            Z*e*j"        d
e
ddfd&            Z*ede+fd'            Z,e,j"        deddfd(            Z,ddddddde-dd)	d*eded+ej        e.         d,ej        e/         d-ej        e0         d.ej        ej1                 dej        e         d	ej        e	         d
ej        e
         dej        ee2f         d/ej        e3         de4fd0Z5dedefd1Z6	 d>d
ej        e
         dej        e
         fd2Z7	 d>d	ej        e	         dej        e	         fd3Z8	 d>dej        e         dej        e         fd4Z9dej        e         dej        e$         fd5Z:e-fd6e4dej        ee2df         de$fd7Z;d6e4d8e<de4fd9Z=d6e4d8e<defd:Z>d6e4d8e<defd;Z?d6e4ded*ede'fd<Z@d6e4d*edej        ej        eAeBf                  fd=ZCdS )?
BaseClientNF Tutf-8authparamsheaderscookiestimeoutfollow_redirectsmax_redirectsevent_hooksbase_url	trust_envdefault_encodingr   r   r   r   r   r   r   r   r   r   r   c                L   |i n|}|                      t          |	                    | _        |                     |          | _        t          |          | _        t          |          | _        t          |          | _
        t          |          | _        || _        || _        t          |                    dg                     t          |                    dg                     d| _        |
| _        || _        t)                      | _        t,          j        | _        d S NrequestrV   )r   rV   )_enforce_trailing_slashr0   	_base_url_build_auth_authr1   _paramsr   r   r   _cookiesr   _timeoutr   r   listget_event_hooks
_trust_env_default_encodingr2   _netrcrM   rP   _state)r`   r   r   r   r   r   r   r   r   r   r   r   s               rF   ra   zBaseClient.__init__   s    " (/bb[55c(mmDD%%d++
"6**w''(((( 0*KOOIr::;;[__Z<<==
 
 $!1kk!*rE   rX   c                 ,    | j         t          j        k    S )z2
        Check if the client being closed
        )r   rM   rR   r`   s    rF   	is_closedzBaseClient.is_closed   s    
 {k000rE   c                     | j         S rZ   )r   r   s    rF   r   zBaseClient.trust_env   s
    rE   urlc                 v    |j                             d          r|S |                    |j         dz             S )N   /raw_path)r   endswith	copy_withr`   r   s     rF   r   z"BaseClient._enforce_trailing_slash   s:    <  && 	J}}clT&9}:::rE   proxiesallow_env_proxiesc                    |.|r*d t                                                      D             S i S t          |t                    r^i }|                                D ]E\  }}t          |t          t
          f          rt          |          n|}||t	          |          <   F|S t          |t          t
          f          rt          |          n|}d|iS )Nc                 >    i | ]\  }}||d nt          |          S )Nr   )r   )rI   rJ   r   s      rF   
<dictcomp>z-BaseClient._get_proxy_map.<locals>.<dictcomp>   s>        S %C...  rE   r   zall://)r5   items
isinstancedictstrr0   r   )r`   r   r   new_proxiesrJ   valueproxys          rF   _get_proxy_mapzBaseClient._get_proxy_map   s     ?   $;$=$=$C$C$E$E    Igt$$ 	%K%mmoo . .
U,6usCj,I,IT%((((u(-CHH%%*4WsCj*I*IVEg&&&&wEe$$rE   c                     | j         S rZ   )r   r   s    rF   r   zBaseClient.timeout   s
    }rE   c                 .    t          |          | _        d S rZ   )r   r   )r`   r   s     rF   r   zBaseClient.timeout       ((rE   c                     | j         S rZ   )r   r   s    rF   r   zBaseClient.event_hooks   s      rE   c                     t          |                    dg                     t          |                    dg                     d| _        d S r   )r   r   r   )r`   r   s     rF   r   zBaseClient.event_hooks   sK    
 KOOIr::;;[__Z<<==
 
rE   c                     | j         S )z
        Authentication class used when none is passed at the request-level.

        See also [Authentication][0].

        [0]: /quickstart/#authentication
        )r   r   s    rF   r   zBaseClient.auth   s     zrE   c                 :    |                      |          | _        d S rZ   )r   r   r`   r   s     rF   r   zBaseClient.auth	  s    %%d++


rE   c                     | j         S )zK
        Base URL to use when sending requests with relative URLs.
        )r   r   s    rF   r   zBaseClient.base_url  s    
 ~rE   c                 T    |                      t          |                    | _        d S rZ   )r   r0   r   r   s     rF   r   zBaseClient.base_url  s!    55c#hh??rE   c                     | j         S )z@
        HTTP headers to include when sending requests.
        )_headersr   s    rF   r   zBaseClient.headers      
 }rE   c                     t          dt                              d          dt                              d          d          }|                    |           || _        d S )Ns   */*asciis
   keep-alive)s   Accepts   Accept-Encodings
   Connections
   User-Agent)r   ACCEPT_ENCODINGencode
USER_AGENTupdater   )r`   r   client_headerss      rF   r   zBaseClient.headers  sd     !$3$:$:7$C$C,)0099	 
 
 	g&&&&rE   c                     | j         S )zA
        Cookie values to include when sending requests.
        )r   r   s    rF   r   zBaseClient.cookies,  r   rE   c                 .    t          |          | _        d S rZ   )r   r   )r`   r   s     rF   r   zBaseClient.cookies3  r   rE   c                     | j         S )zO
        Query parameters to include in the URL when sending requests.
        )r   r   s    rF   r   zBaseClient.params7  s    
 |rE   c                 .    t          |          | _        d S rZ   )r1   r   )r`   r   s     rF   r   zBaseClient.params>  s    "6**rE   )	contentdatafilesjsonr   r   r   r   
extensionsmethodr   r   r   r   r   c       	            |                      |          }|                     |          }|                     |	          }	|                     |          }|i n|}d|vrMt	          |
t
                    r| j        nt          |
          }
t          di |d|
	                                i}t          |||||||||	|
  
        S )aJ  
        Build and return a request instance.

        * The `params`, `headers` and `cookies` arguments
        are merged with any values set on the client.
        * The `url` argument is merged with any `base_url` set on the client.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        Nr   )r   r   r   r   r   r   r   r   rD   )
_merge_url_merge_headers_merge_cookies_merge_queryparamsr   r?   r   r   r   as_dictr   )r`   r   r   r   r   r   r   r   r   r   r   r   s               rF   build_requestzBaseClient.build_requestB  s    4 ooc""%%g..%%g..((00%-RR:
J&& g'788&W%% 
 FF
FFGOO4E4EFFFJ!
 
 
 	
rE   c                     t          |          }|j        rB| j        j        |j                            d          z   }| j                            |          S |S )z
        Merge a URL argument together with any 'base_url' on the client,
        to create the URL used for the outgoing request.
        r   r   )r0   is_relative_urlr   r   lstripr   )r`   r   	merge_urlmerge_raw_paths       rF   r   zBaseClient._merge_urlu  s]    
 HH	$ 	D "]3i6H6O6OPT6U6UUN=**N*CCCrE   c                 n    |s| j         r+t          | j                   }|                    |           |S |S )z
        Merge a cookies argument together with any cookies on the client,
        to create the cookies used for the outgoing request.
        )r   r   r   )r`   r   merged_cookiess      rF   r   zBaseClient._merge_cookies  sC      	"dl 	"$T\22N!!'***!!rE   c                 X    t          | j                  }|                    |           |S )z
        Merge a headers argument together with any headers on the client,
        to create the headers used for the outgoing request.
        )r   r   r   )r`   r   merged_headerss      rF   r   zBaseClient._merge_headers  s-     !..g&&&rE   c                 j    |s| j         r)t          | j                   }|                    |          S |S )z
        Merge a queryparams argument together with any queryparams on the client,
        to create the queryparams used for the outgoing request.
        )r   r1   merge)r`   r   merged_queryparamss      rF   r   zBaseClient._merge_queryparams  s>      	4T[ 	4!,T[!9!9%++F333rE   c                     |d S t          |t                    rt          |d         |d                   S t          |t                    r|S t	          |          rt          |          S t          d|          )Nr   r   usernamepassword)funczInvalid "auth" argument: )r   tupler	   r   callabler
   	TypeErrorr   s     rF   r   zBaseClient._build_auth  s    <4e$$ 	Bd1gQ@@@@d## 	BKd^^ 	BT****@@@AAArE   r   c                    t          |t                    r| j        n|                     |          }||S |j        j        |j        j        }}|s|rt          ||          S | j        rLd|j	        vrC| j
                            |j        j                  }|t          |d         |d                   S t                      S )Nr   Authorizationr   r   )r   r?   r   r   r   r   r   r	   r   r   r   get_credentialshostr   )r`   r   r   r   r   credentialss         rF   _build_request_authzBaseClient._build_request_auth  s     %T+;<<XDJJ$BRBRSWBXBX 	 K$[17;3G( 	Cx 	ChBBBB> 	SoW_DD+55gk6FGGK& +a.;q>RRRRvvrE   rV   c                    |                      ||          }|                     ||          }|                     |||          }|                     ||          }t	          | j                  }t          ||||||j                  S )z
        Given a request and a redirect response, return a new request that
        should be used to effect the redirect.
        )r   r   r   r   rU   r   )_redirect_method_redirect_url_redirect_headers_redirect_streamr   r   r   r   )r`   r   rV   r   r   r   rU   r   s           rF   _build_redirect_requestz"BaseClient._build_redirect_request  s    
 &&w99  (33((#v>>&&w77$,'')
 
 
 	
rE   c                     |j         }|j        t          j        k    r|dk    rd}|j        t          j        k    r|dk    rd}|j        t          j        k    r|dk    rd}|S )z
        When being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        HEADGETPOST)r   status_coder   	SEE_OTHERFOUNDMOVED_PERMANENTLY)r`   r   rV   r   s       rF   r   zBaseClient._redirect_method  st    
  5?22v7G7GF 5;..6V3C3CF 5#:::v?O?OFrE   c                    |j         d         }	 t          |          }n(# t          $ r}t          d| d|          dd}~ww xY w|j        r'|j        s |                    |j        j                  }|j        r|j        	                    |          }|j        j
        r'|j
        s |                    |j        j
                  }|S )z<
        Return the URL for the redirect to follow.
        Locationz Invalid URL in location header: .r   N)r   )fragment)r   r0   r   r   schemer   r   r   r   joinr
  )r`   r   rV   locationr   excs         rF   r   zBaseClient._redirect_url  s     #J/	h--CC 	 	 	%939997  	 : 	7ch 	7--W[%5-66C  	(+""3''C ; 	? 	?--)=->>C
s    
A?Ac                    t          |j                  }t          ||j                  sHt	          |j        |          s|                    dd           |j                            d          |d<   ||j        k    r2|dk    r,|                    dd           |                    dd           |                    dd           |S )	zR
        Return the headers that should be used for the redirect request.
        r   Nr   Hostr   zContent-LengthzTransfer-EncodingCookie)	r   r   r8   r   r7   popnetlocdecoder   )r`   r   r   r   r   s        rF   r   zBaseClient._redirect_headers  s     '/**3,, 	9$W[#66 3 OT222 "j//88GFOW^##% KK($///KK+T222 	Hd###rE   c                 6    ||j         k    r|dk    rdS |j        S )zO
        Return the body that should be used for the redirect request.
        r   N)r   rU   )r`   r   r   s      rF   r   zBaseClient._redirect_stream4  s&     W^##%4~rE   rZ   )Dr@   rA   rB   r   r   rr   Optionalr"   r'   r%   r$   r-   boolintMappingr   List	EventHookr.   UnionCallablert   ra   propertyr   r   r0   r   r&   Dictr   r   r   r   setterr   r   r   r   r   r   r   r   r1   r   USE_CLIENT_DEFAULTr(   r)   r+   Anyr?   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r,   r!   r   rD   rE   rF   r   r      s        ,0370404 6!&2 MT#+ #+ #+ oi(#+ 0	#+
 -#+ -#+ #+ #+ #+ _N3I 667
#+ #+ #+ !,sFOUGSL,I'IJ#+ #+ #+ #+J 14 1 1 1 X1 4    X;3 ;3 ; ; ; ;
%|4%IM%	S&/%00	1% % % %(     X ^)| ) ) ) ) ^) !V[fk).D)DE ! ! ! X! 
!;sFK	,B'BC
	
 
 
 
 fod+    X 
[, ,t , , , [, #    X _@H @ @ @ @ _@     X ^
'{ 
't 
' 
' 
' ^
'     X ^){ )t ) ) ) ^)     X ]+_ + + + + ]+ 48-1/3,0370404@R9=1
 1
 1
1
 1

 01
 ok*1
 |,1
 ofj)1
 01
 -1
 -1
 l,<<=1
 O$561
 
1
 1
 1
 1
fh 3    . 7; {3		%    7;	 	{3			%	 	 	 	 :>
 
oo6
		)
 
 
 

B	 : 
Bvt?T 
B 
B 
B 
B AS  l9&6<= 
	   .
w 
( 
w 
 
 
 
& 8     .W  S    : s C G    6		(+		no&EF	G	 	 	 	 	 	rE   r   c            -           e Zd ZdZddddddddddedeeddddddddej        e	         d	ej        e
         d
ej        e         dej        e         dedej        e         dededej        e         dej        ej        eef                  dededededej        ej        eej        e         f                  dedej        e         dej        ej        dej        f                  dedej        eej        egef         f         f( fdZddddedddfdedej        e         dedededej        e         dej        ej        dej        f                  dedefdZddddedfd e dedej        e         dededededefd!Z!d"e"defd#Z#ddddddde$e$e$dd$d%ed"ed&ej        e%         d'ej        e&         d(ej        e'         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e(df         dej        ee(f         dej        ee(f         d*ej        e)         de*fd+Z+e,ddddddde$e$e$dd$d%ed"ed&ej        e%         d'ej        e&         d(ej        e'         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e(df         dej        ee(f         dej        ee(f         d*ej        e)         dej-        e*         fd,            Z.de$e$d-d.e/d/edej        e	e(df         dej        ee(f         de*f
d0Z0d.e/de1ded1ej        e*         de*f
d2Z2d.e/ded1ej        e*         de*fd3Z3d.e/de*fd4Z4ddde$e$e$dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd6Z5ddde$e$e$dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd7Z6ddde$e$e$dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd8Z7ddddddde$e$e$dd$d"ed&ej        e%         d'ej        e&         d(ej        e'         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd9Z8ddddddde$e$e$dd$d"ed&ej        e%         d'ej        e&         d(ej        e'         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd:Z9ddddddde$e$e$dd$d"ed&ej        e%         d'ej        e&         d(ej        e'         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd;Z:ddde$e$e$dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e(f         dej        ee(f         dej        ee(f         d*ej        e)         de*fd<Z;dDd=Z<d>e=de=fd?Z>	 	 	 dEd@ej        ej?        e@                  dAej        e@         dBej        eA         ddfdCZB xZCS )Fr:   a  
    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)* An authentication class to use when sending
    requests.
    * **params** - *(optional)* Query parameters to include in request URLs, as
    a string, dictionary, or sequence of two-tuples.
    * **headers** - *(optional)* Dictionary of HTTP headers to include when
    sending requests.
    * **cookies** - *(optional)* Dictionary of Cookie items to include when
    sending requests.
    * **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).
    * **proxies** - *(optional)* A dictionary mapping proxy keys to proxy
    URLs.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    requests.
    * **limits** - *(optional)* The limits configuration to use.
    * **max_redirects** - *(optional)* The maximum number of redirect responses
    that should be followed.
    * **base_url** - *(optional)* A URL to use as the base when building
    request URLs.
    * **transport** - *(optional)* A transport class to use for sending requests
    over the network.
    * **app** - *(optional)* An WSGI application to send requests to,
    rather than sending actual network requests.
    * **trust_env** - *(optional)* Enables or disables usage of environment
    variables for configuration.
    * **default_encoding** - *(optional)* The default encoding to use for decoding
    response text, if no charset information is included in a response Content-Type
    header. Set to a callable for automatic character set detection. Default: "utf-8".
    NTFr   r   r   r   r   r   verifycerthttp1http2r   mountsr   r   limitsr   r   r   	transportappr   r   r   r   r   r   r%  r&  r'  r(  r   r)  r   r   r*  r   r   r   r+  r,  .r   r   c                t    t                                          ||||||||||           r$	 dd l}n# t          $ r t          d          d w xY wo|d u o|d u }                     |	|          }                     ||           _         fd|                                D              _        |
6 j        	                    d |
                                D                        t          t           j                                                             _        d S )Nr   r   uUsing http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.r%  r&  r'  r(  r*  r+  r,  r   c                 r    i | ]3\  }}t          |          |d n                    |	          4S Nr%  r&  r'  r(  r*  r   r4   _init_proxy_transport
rI   rJ   r   r&  r'  r(  r*  r`   r   r%  s
      rF   r   z#Client.__init__.<locals>.<dictcomp>  st     Q
 Q
 Q
 U sOO} "T++# ,  Q
 Q
 Q
rE   c                 4    i | ]\  }}t          |          |S rD   r4   rI   rJ   r+  s      rF   r   z#Client.__init__.<locals>.<dictcomp>  $    QQQYC)QQQrE   superra   h2ImportErrorr   _init_transport
_transportr   _mountsr   r   sortedr`   r   r   r   r   r%  r&  r'  r(  r   r)  r   r   r*  r   r   r   r+  r,  r   r   r<  r   	proxy_map	__class__s   `    ````    `     `    rF   ra   zClient.__init__s  s   4 	-'#- 	 	
 	
 	
  					   !S   &K#+K)t:K''1BCC	.. / 	
 	
Q
 Q
 Q
 Q
 Q
 Q
 Q
 Q
 Q
 Q
 (oo//Q
 Q
 Q
 LQQ&,,..QQQ   F4<#5#5#7#78899	   = ArX   c	                 X    ||S |t          |          S t          ||||||          S N)r,  r2  )r    r   	r`   r%  r&  r'  r(  r*  r+  r,  r   s	            rF   r>  zClient._init_transport  sO      ? S))))
 
 
 	
rE   r   c           	      .    t          |||||||          S )N)r%  r&  r'  r(  r*  r   r   )r   r`   r   r%  r&  r'  r(  r*  r   s           rF   r4  zClient._init_proxy_transport  s0     
 
 
 	
rE   r   c                     | j                                         D ]'\  }}|                    |          r|| j        n|c S (| j        S z
        Returns the transport instance that should be used for a given URL.
        This will either be the standard connection pool, or a proxy.
        r@  r   matchesr?  r`   r   patternr+  s       rF   _transport_for_urlzClient._transport_for_url  d    
 #',"4"4"6"6 	K 	KGYs## K*3*;tJJJK rE   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                    |	d}t          j        |t                     |                     |||||||||	||          }|                     ||
|          S )a  
        Build and send a request.

        Equivalent to:

        ```python
        request = client.build_request(...)
        response = client.send(request, ...)
        ```

        See `Client.build_request()`, `Client.send()` and
        [Merging of configuration][0] for how the various parameters
        are merged with client-level configuration.

        [0]: /advanced/#merging-of-configuration
        NzSetting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.r   r   r   r   r   r   r   r   r   r   r   r   r   )warningswarnDeprecationWarningr   send)r`   r   r   r   r   r   r   r   r   r   r   r   r   r   messager   s                   rF   r   zClient.request  s    B C 
 M'#5666$$! % 
 
 yyt>NyOOOrE   c             #      K   |                      |||||||||	||          }|                     ||
|d          }	 |V  |                                 dS # |                                 w xY wa  
        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
        rU  T)r   r   r   rU   N)r   rZ  ro   r`   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rV   s                   rF   rU   zClient.stream7  s      8 $$! % 
 
 99-	  
 
	NNNNNHNNs   A A-rU   r   r   r   rU   c                   | j         t          j        k    rt          d          t          j        | _         t          |t                    r| j        n|}|                     ||          }| 	                    |||g           }	 |s|
                                 |S # t          $ r}|                                 |d}~ww xY w)a  
        Send a request.

        The request is sent as-is, unmodified.

        Typically you'll want to build one with `Client.build_request()`
        so that any client-level configuration is merged into the request,
        but passing an explicit `httpx.Request()` is supported as well.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        5Cannot send a request, as the client has been closed.r   r   historyN)r   rM   rR   RuntimeErrorrQ   r   r?   r   r   _send_handling_authreadBaseExceptionro   r`   r   rU   r   r   rV   r  s          rF   rZ  zClient.sendk  s    * ;+,,,VWWW!( *,<=="D!!! 	 ''66++-	 , 
 
	  O 	 	 	NNI	s   B 
C&B<<Crc  c                    |                     |          }	 t          |          }	 |                     |||          }	 	 |                    |          }n&# t          $ r |cY |                                 S w xY wt          |          |_        |                                 |}|	                    |           n(# t          $ r}|                                 |d }~ww xY w# |                                 w xY wNT)r   rc  )sync_auth_flownext_send_handling_redirectsrZ  StopIterationro   r   rc  rf  appendrg  	r`   r   r   r   rc  	auth_flowrV   next_requestr  s	            rF   re  zClient._send_handling_auth  s,    ''00		9ooG88%5# 9  
('0~~h'?'?( ( ( (' OO( (,G}}H$MMOOO*GNN8,,,,$   NN$$$I#* OOsN   (C& A B= A:#B= 9A::AB= <C& =
C"CC""C& &C<c                    	 t          |          | j        k    rt          d|          | j        d         D ]} ||           |                     |          }	 | j        d         D ]} ||           t          |          |_        |j        s|S |                     ||          }||gz   }|r|	                                 n	||_
        |S n(# t          $ r}|                                 |d }~ww xY wNTz#Exceeded maximum allowed redirects.r	  r   rV   )lenr   r   r   _send_single_requestr   rc  has_redirect_locationr   rf  rr  rg  ro   r`   r   r   rc  hookrV   r  s          rF   rm  zClient._send_handling_redirects  s@   	7||d000&97    ))4  W0099H -j9 # #DDNNNN#'== 5 $#O66wII!XJ.# $MMOOOO,3H)#O $
 !      	7	s   7C ;C 
C6C11C6c                    |                      |j                  }t                      }|                                 t	          |j        t                    st          d          t          |          5  |	                    |          }ddd           n# 1 swxY w Y   t	          |j        t                    sJ ||_
        t          |j        ||          |_        | j                            |           | j        |_        |j         d|j         }|j         d| }t&                              d|j        |j        |           |S )L
        Sends a single request, without handling any redirections.
        z?Attempted to send an async request with a sync Client instance.r	  NrV   rW    HTTP Request: %s %s "%s")rQ  r   r3   
sync_startr   rU   r,   rd  r   handle_requestr   rT   r   extract_cookiesr   r   r  reason_phrasehttp_versionloggerdebugr   r`   r   r+  rW   rV   statusresponse_lines          rF   rv  zClient._send_single_request  s    ++GK88	'..99 	Q   W--- 	9 	9 //88H	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 (/>:::::")Ohe
 
 
 	$$X...$($:!(CC8+ACC#0;;6;;&]	
 	
 	
 s   6BBBr   r   r   r   r   r   r   c                >    |                      d||||||||	  	        S )U
        Send a `GET` request.

        **Parameters**: See `httpx.request`.
        r   r  r	  	r`   r   r   r   r   r   r   r   r   s	            rF   r   z
Client.get  s:    " ||-!  

 

 
	
rE   c                >    |                      d||||||||	  	        S )Z
        Send an `OPTIONS` request.

        **Parameters**: See `httpx.request`.
        OPTIONSr  r	  r  s	            rF   optionszClient.options!  s:    " ||-!  

 

 
	
rE   c                >    |                      d||||||||	  	        S )V
        Send a `HEAD` request.

        **Parameters**: See `httpx.request`.
        r   r  r	  r  s	            rF   headzClient.head>  s:    " ||-!  

 

 
	
rE   c                F    |                      d|||||||||	|
||          S )V
        Send a `POST` request.

        **Parameters**: See `httpx.request`.
        r  rS  r	  r`   r   r   r   r   r   r   r   r   r   r   r   r   s                rF   postzClient.post[  sF    * ||-!  
 
 	
rE   c                F    |                      d|||||||||	|
||          S )U
        Send a `PUT` request.

        **Parameters**: See `httpx.request`.
        PUTrS  r	  r  s                rF   putz
Client.put  sF    * ||-!  
 
 	
rE   c                F    |                      d|||||||||	|
||          S )W
        Send a `PATCH` request.

        **Parameters**: See `httpx.request`.
        PATCHrS  r	  r  s                rF   patchzClient.patch  sF    * ||-!  
 
 	
rE   c                >    |                      d||||||||	  	        S )X
        Send a `DELETE` request.

        **Parameters**: See `httpx.request`.
        DELETEr  r	  r  s	            rF   deletezClient.delete  s:    " ||-!  

 

 
	
rE   c                     | j         t          j        k    r\t          j        | _         | j                                         | j                                        D ]}||                                 dS dS z.
        Close transport and proxies.
        N)r   rM   rR   r?  ro   r@  values)r`   r+  s     rF   ro   zClient.close  sx     ;+,,,%,DKO!!###!\0022 & &	(OO%%% -,& &rE   r`   c                 P   | j         t          j        k    r4t          j        dt          j        di| j                  }t          |          t          j        | _         | j                                         | j        	                                D ]}||                                 | S Nz-Cannot open a client instance more than once.z9Cannot reopen a client instance, once it has been closed.)
r   rM   rP   rQ   rR   rd  r?  	__enter__r@  r  )r`   msgr+  s      rF   r  zClient.__enter__  s    ;+..."$S"$_ kC s###!(!!###,,.. 	& 	&I$##%%%rE   exc_type	exc_value	tracebackc                     t           j        | _        | j                            |||           | j                                        D ]}||                    |||           d S rZ   )rM   rR   r   r?  __exit__r@  r  )r`   r  r  r  r+  s        rF   r  zClient.__exit__  sr     "(  9i@@@,,.. 	C 	CI$""8Y	BBB	C 	CrE   rq   NNN)Dr@   rA   rB   rC   r   r   r   rr   r  r"   r'   r%   r$   r/   r#   r  r&   r  r   r   r-   r   r  r  r  r.   r  r"  r  rt   ra   r>  r   r4  r0   rQ  r!  r(   r)   r+   r?   r*   r   r   r   rs   rU   r   rZ  r   re  rm  rv  r   r  r  r  r  r  r  ro   r9   r  Typerg  r   r  __classcell__rD  s   @rF   r:   r:   @  sb       0 0j ,0370404"+/15FJ 6!&'2 48AEMT1Q: Q: Q: oi(Q: 0	Q:
 -Q: -Q: Q: oi(Q: Q: Q: .Q: sM/A BCQ: Q: Q: Q:  !Q:" _N3I 667
#Q:( )Q:* ?=1+Q:, _V_S&*_=>-Q:. /Q:0 !,sFOUGSL,I'IJ1Q: Q: Q: Q: Q: Q:j #+/'48AE
 

 oi(
 	

 
 
 ?=1
 _V_S&*_=>
 
 

 
 
 
: #+/'
 

 
 oi(	

 
 
 
 
 

 
 
 
(	c 	m 	 	 	 	  48-1/3,0370404@RAS@R9=6P 6P 6P6P 6P
 06P ok*6P |,6P ofj)6P 06P -6P -6P l9&6<=6P !,t-='=>6P l,<<=6P O$566P  
!6P 6P 6P 6Pp  48-1/3,0370404@RAS@R9=1 1 11 1
 01 ok*1 |,1 ofj)1 01 -1 -1 l9&6<=1 !,t-='=>1 l,<<=1 O$561  
	"!1 1 1 ^1n @RAS/ / // 	/
 l9&6<=/ !,t-='=>/ 
/ / / /b     	 
 X&  
       D## # X&	#
 
# # # #JG     J 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
:
& 
& 
& 
& a    $ AE4848	C C/&+m"<=C ?=1C ?=1	C
 
C C C C C C C CrE   c            -       8    e Zd ZdZddddddddddedeeddddddddej        e	         d	ej        e
         d
ej        e         dej        e         dedej        e         dededej        e         dej        ej        eef                  dededededej        ej        eej        ej        dej        f                  f                  dedej        e         dej        ej        dej        f                  dedej        eej        egef         f         f( fdZddddedddfdedej        e         dedededej        e         dej        ej        dej        f                  dedefdZddddedfd ededej        e         dededededefd!Z d"e!defd#Z"ddddddde#e#e#dd$d%ed"ed&ej        e$         d'ej        e%         d(ej        e&         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e'df         dej        ee'f         dej        ee'f         d*ej        e(         de)fd+Z*e+ddddddde#e#e#dd$d%ed"ed&ej        e$         d'ej        e%         d(ej        e&         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         dej,        e)         fd,            Z-de#e#d-d.e.d/edej        e	e'df         dej        ee'f         de)f
d0Z/d.e.de0ded1ej        e)         de)f
d2Z1d.e.ded1ej        e)         de)fd3Z2d.e.de)fd4Z3ddde#e#e#dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e'df         dej        ee'f         dej        ee'f         d*ej        e(         de)fd6Z4ddde#e#e#dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd7Z5ddde#e#e#dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd8Z6ddddddde#e#e#dd$d"ed&ej        e$         d'ej        e%         d(ej        e&         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd9Z7ddddddde#e#e#dd$d"ed&ej        e$         d'ej        e%         d(ej        e&         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd:Z8ddddddde#e#e#dd$d"ed&ej        e$         d'ej        e%         d(ej        e&         d)ej        ej                 d	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd;Z9ddde#e#e#dd5d"ed	ej        e
         d
ej        e         dej        e         dej        e	e'f         dej        ee'f         dej        ee'f         d*ej        e(         de)fd<Z:dDd=Z;d>e<de<fd?Z=	 	 	 dEd@ej        ej>        e?                  dAej        e?         dBej        e@         ddfdCZA xZBS )Fr=   a	  
    An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
    cookie persistence, etc.

    Usage:

    ```python
    >>> async with httpx.AsyncClient() as client:
    >>>     response = await client.get('https://example.org')
    ```

    **Parameters:**

    * **auth** - *(optional)* An authentication class to use when sending
    requests.
    * **params** - *(optional)* Query parameters to include in request URLs, as
    a string, dictionary, or sequence of two-tuples.
    * **headers** - *(optional)* Dictionary of HTTP headers to include when
    sending requests.
    * **cookies** - *(optional)* Dictionary of Cookie items to include when
    sending requests.
    * **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).
    * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
    enabled. Defaults to `False`.
    * **proxies** - *(optional)* A dictionary mapping HTTP protocols to proxy
    URLs.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    requests.
    * **limits** - *(optional)* The limits configuration to use.
    * **max_redirects** - *(optional)* The maximum number of redirect responses
    that should be followed.
    * **base_url** - *(optional)* A URL to use as the base when building
    request URLs.
    * **transport** - *(optional)* A transport class to use for sending requests
    over the network.
    * **app** - *(optional)* An ASGI application to send requests to,
    rather than sending actual network requests.
    * **trust_env** - *(optional)* Enables or disables usage of environment
    variables for configuration.
    * **default_encoding** - *(optional)* The default encoding to use for decoding
    response text, if no charset information is included in a response Content-Type
    header. Set to a callable for automatic character set detection. Default: "utf-8".
    NTFr   r   r$  r   r   r   r   r%  r&  r'  r(  r   r)  r   r   r*  r   r   .r   r+  r,  r   r   c                t    t                                          ||||||||||           r$	 dd l}n# t          $ r t          d          d w xY wo|d u o|d u }                     |	|          }                     ||           _         fd|                                D              _        |
6 j        	                    d |
                                D                        t          t           j                                                             _        d S )Nr   r   r.  r/  c                 r    i | ]3\  }}t          |          |d n                    |	          4S r1  r3  r5  s
      rF   r   z(AsyncClient.__init__.<locals>.<dictcomp>  st     V
 V
 V
 U sOO} "T++# ,  V
 V
 V
rE   c                 4    i | ]\  }}t          |          |S rD   r7  r8  s      rF   r   z(AsyncClient.__init__.<locals>.<dictcomp>  r9  rE   r:  rB  s   `    ````    `     `    rF   ra   zAsyncClient.__init__D  s   4 	-'#- 	 	
 	
 	
  					   !S   &K#+K)t:K''1BCC	.. / 	
 	
V
 V
 V
 V
 V
 V
 V
 V
 V
 V
 (oo//V
 V
 V
 LQQ&,,..QQQ   F4<#5#5#7#78899rE  rX   c	                 X    ||S |t          |          S t          ||||||          S rG  )r   r   rH  s	            rF   r>  zAsyncClient._init_transport  sO      ? S))))!
 
 
 	
rE   r   c                 ,    t          ||||||          S )N)r%  r&  r(  r*  r   r   )r   rJ  s           rF   r4  z!AsyncClient._init_proxy_transport  s-     "
 
 
 	
rE   r   c                     | j                                         D ]'\  }}|                    |          r|| j        n|c S (| j        S rL  rM  rO  s       rF   rQ  zAsyncClient._transport_for_url  rR  rE   rS  r   r   r   r   r   r   c                   K   |                      |||||||||	||          }|                     ||
|           d{V S )a  
        Build and send a request.

        Equivalent to:

        ```python
        request = client.build_request(...)
        response = await client.send(request, ...)
        ```

        See `AsyncClient.build_request()`, `AsyncClient.send()`
        and [Merging of configuration][0] for how the various parameters
        are merged with client-level configuration.

        [0]: /advanced/#merging-of-configuration
        rU  rV  N)r   rZ  )r`   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s                  rF   r   zAsyncClient.request  sq      B $$! % 
 
 YYwTDTYUUUUUUUUUrE   c                 K   |                      |||||||||	||          }|                     ||
|d           d{V }	 |W V  |                                 d{V  dS # |                                 d{V  w xY wr]  )r   rZ  r|   r^  s                   rF   rU   zAsyncClient.stream  s      8 $$! % 
 
 -	 # 
 
 
 
 
 
 
 
	$NNNN//###########(//##########s   A$ $B r_  r   rU   c                  K   | j         t          j        k    rt          d          t          j        | _         t          |t                    r| j        n|}|                     ||          }| 	                    |||g            d{V }	 |s|
                                 d{V  |S # t          $ r!}|                                 d{V  |d}~ww xY w)a  
        Send a request.

        The request is sent as-is, unmodified.

        Typically you'll want to build one with `AsyncClient.build_request()`
        so that any client-level configuration is merged into the request,
        but passing an explicit `httpx.Request()` is supported as well.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        ra  rb  N)r   rM   rR   rd  rQ   r   r?   r   r   re  areadrg  r|   rh  s          rF   rZ  zAsyncClient.send3  s,     * ;+,,,VWWW!( *,<=="D!!! 	 ''6611-	 2 
 
 
 
 
 
 
 
	 'nn&&&&&&&&&O 	 	 	//#########I	s   B* *
C4CCrc  c                 `  K   |                     |          }	 |                                 d {V }	 |                     |||           d {V }	 	 |                    |           d {V }n,# t          $ r |cY |                                 d {V  S w xY wt          |          |_        |                                 d {V  |}|	                    |           n.# t          $ r!}|                                 d {V  |d }~ww xY w# |                                 d {V  w xY wrj  )async_auth_flow	__anext__rm  asendStopAsyncIterationr|   r   rc  r  ro  rg  rp  s	            rF   re  zAsyncClient._send_handling_authd  s      ((11		%%//11111111G!%!>!>%5# "? " "      
(-6__X-F-F'F'F'F'F'F'F- ( ( (' ""$$$$$$$$$$( (,G}}H$"..**********GNN8,,,,$   "//+++++++++I#* ""$$$$$$$$$$sN   9D A0 /C" 0B<C" BAC" !D "
D,DDD D-c                 6  K   	 t          |          | j        k    rt          d|          | j        d         D ]} ||           d {V  |                     |           d {V }	 | j        d         D ]} ||           d {V  t          |          |_        |j        s|S |                     ||          }||gz   }|r|	                                 d {V  n	||_
        |S n.# t          $ r!}|                                 d {V  |d }~ww xY wrt  )ru  r   r   r   rv  r   rc  rw  r   r  rr  rg  r|   rx  s          rF   rm  z$AsyncClient._send_handling_redirects  s     	7||d000&97    ))4 $ $d7mm########!66w????????H -j9 ) )D$x..((((((((#'== 5 $#O66wII!XJ.# $"..**********,3H)#O +
 !   oo'''''''''	9	s   *=C+ (AC+ +
D5DDc                   K   |                      |j                  }t                      }|                                 d{V  t	          |j        t                    st          d          t          |          5  |	                    |           d{V }ddd           n# 1 swxY w Y   t	          |j        t                    sJ ||_
        t          |j        ||          |_        | j                            |           | j        |_        |j         d|j         }|j         d| }t&                              d|j        |j        |           |S )r{  Nz?Attempted to send an sync request with an AsyncClient instance.r	  r|  r}  r~  )rQ  r   r3   async_startr   rU   r!   rd  r   handle_async_requestr   rv   r   r  r   r   r  r  r  r  r  r   r  s          rF   rv  z AsyncClient._send_single_request  s      ++GK88	!!!!!!!!!'./:: 	Q   W--- 	E 	E&;;GDDDDDDDDH	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E (/?;;;;;"*Ohe
 
 
 	$$X...$($:!(CC8+ACC#0;;6;;&]	
 	
 	
 s   >B&&B*-B*r  c                N   K   |                      d||||||||	  	         d{V S )r  r   r  Nr	  r  s	            rF   r   zAsyncClient.get  s\      " \\-! " 

 

 

 

 

 

 

 

 
	
rE   c                N   K   |                      d||||||||	  	         d{V S )r  r  r  Nr	  r  s	            rF   r  zAsyncClient.options  s\      " \\-! " 

 

 

 

 

 

 

 

 
	
rE   c                N   K   |                      d||||||||	  	         d{V S )r  r   r  Nr	  r  s	            rF   r  zAsyncClient.head  s\      " \\-! " 

 

 

 

 

 

 

 

 
	
rE   c                V   K   |                      d|||||||||	|
||           d{V S )r  r  rS  Nr	  r  s                rF   r  zAsyncClient.post#  sh      * \\-! " 
 
 
 
 
 
 
 
 	
rE   c                V   K   |                      d|||||||||	|
||           d{V S )r  r  rS  Nr	  r  s                rF   r  zAsyncClient.putH  sh      * \\-! " 
 
 
 
 
 
 
 
 	
rE   c                V   K   |                      d|||||||||	|
||           d{V S )r  r  rS  Nr	  r  s                rF   r  zAsyncClient.patchm  sh      * \\-! " 
 
 
 
 
 
 
 
 	
rE   c                N   K   |                      d||||||||	  	         d{V S )r  r  r  Nr	  r  s	            rF   r  zAsyncClient.delete  s\      " \\-! " 

 

 

 

 

 

 

 

 
	
rE   c                   K   | j         t          j        k    rht          j        | _         | j                                         d{V  | j                                        D ] }||                                 d{V  dS dS r  )r   rM   rR   r?  r|   r@  r  )r`   r   s     rF   r|   zAsyncClient.aclose  s       ;+,,,%,DK/((*********,,.. ) )$,,..((((((( -,) )rE   r`   c                 l  K   | j         t          j        k    r4t          j        dt          j        di| j                  }t          |          t          j        | _         | j                                         d {V  | j        	                                D ]}||                                 d {V  | S r  )
r   rM   rP   rQ   rR   rd  r?  
__aenter__r@  r  )r`   r  r   s      rF   r  zAsyncClient.__aenter__  s      ;+..."$S"$_ kC s###!(o((*********\((** 	) 	)E &&(((((((((rE   r  r  r  c                    K   t           j        | _        | j                            |||           d {V  | j                                        D ]!}||                    |||           d {V  "d S rZ   )rM   rR   r   r?  	__aexit__r@  r  )r`   r  r  r  r   s        rF   r  zAsyncClient.__aexit__  s       "(o'')YGGGGGGGGG\((** 	F 	FE ooh	9EEEEEEEEE	F 	FrE   rq   r  )Cr@   rA   rB   rC   r   r   r   rr   r  r"   r'   r%   r$   r/   r#   r  r&   r  r   r   r-   r   r  r  r  r"  r.   r  rt   ra   r>  r   r4  r0   rQ  r!  r(   r)   r+   r?   r*   r   r   r   r}   rU   r   rZ  r   re  rm  rv  r   r  r  r  r  r  r  r|   r<   r  r  rg  r   r  r  r  s   @rF   r=   r=     su       0 0j ,0370404"+/15KO 6!&'2 9=AEMT1Q: Q: Q: oi(Q: 0	Q:
 -Q: -Q: Q: oi(Q: Q: Q: .Q: s4F/F GHQ: Q: Q: Q:  !Q:" _N3FOCO,L MMN
#Q:( )Q:* ?#56+Q:, _V_S&*_=>-Q:. /Q:0 !,sFOUGSL,I'IJ1Q: Q: Q: Q: Q: Q:j #+/'9=AE
 

 oi(
 	

 
 
 ?#56
 _V_S&*_=>
 
 

 
 
 
: #+/'
 

 
 oi(	

 
 
 
 
 

 
 
 
&	c 	.@ 	 	 	 	  48-1/3,0370404@RAS@R9=.V .V .V.V .V
 0.V ok*.V |,.V ofj).V 0.V -.V -.V l9&6<=.V !,t-='=>.V l,<<=.V O$56.V  
!.V .V .V .V`  48-1/3,0370404:LAS@R9=1$ 1$ 1$1$ 1$
 01$ ok*1$ |,1$ ofj)1$ 01$ -1$ -1$ l9&6671$ !,t-='=>1$ l,<<=1$ O$561$  
	h	'!1$ 1$ 1$ 1$n @RAS/ / // 	/
 l9&6<=/ !,t-='=>/ 
/ / / /b % %  % 	 %
 X& % 
 %  %  %  %D$$ $ X&	$
 
$ $ $ $L' h    H 480404@RAS@R9=
 
 

 0	

 -
 -
 l9&6<=
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
B 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 48-1/3,0370404:LAS@R9=#
 #
 #
#
 0	#

 ok*#
 |,#
 ofj)#
 0#
 -#
 -#
 l9&667#
 !,t-='=>#
 l,<<=#
 O$56#
 
#
 #
 #
 #
R 480404:LAS@R9=
 
 

 0	

 -
 -
 l9&667
 !,t-='=>
 l,<<=
 O$56
 

 
 
 
:
) 
) 
) 
)q Q    $ AE4848	F F/&+m"<=F ?=1F ?=1	F
 
F F F F F F F FrE   )]rl   enumrr   rW  
contextlibr   r   typesr   r   r   r   r	   r
   _configr   r   r   r   r   r   	_decodersr   _exceptionsr   r   r   r   _modelsr   r   r   r   _status_codesr   _transports.asgir   _transports.baser   r   _transports.defaultr   r   _transports.wsgir    _typesr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   _urlsr0   r1   _utilsr2   r3   r4   r5   r6   r7   r8   TypeVarr9   r<   r?   r!  r@   r  r   r  keysr   EnumrM   rT   rv   r  r"  r  r   r:   r=   rD   rE   rF   <module>r     s       : : : : : : : :       $ $ $ $ $ $ 0 0 0 0 0 0 0 0 0 0                * ) ) ) ) )            9 8 8 8 8 8 8 8 8 8 8 8             + + + + + + ? ? ? ? ? ? ? ? B B B B B B B B + + + + + +                                 " $ # # # # # # #                  FN3h'''FN3m,,,       ( &%''  
H		*[**
))CC+&+--CCC 
    $)       n   .$ $ $ $ $ $ $ $. OCO,	^ ^ ^ ^ ^ ^ ^ ^BNC NC NC NC NCZ NC NC NCbEF EF EF EF EF* EF EF EF EF EFrE   