
    Ii                    V   S SK r S SKrS SKrS SKrS SKrS SKJrJr  S SKJ	r	  SSK
J
r
  SSKJrJrJr  SSKJrJrJrJrJrJr  SSKJr  SS	KJrJrJrJr  SS
KJrJrJ r J!r!  SSK"J#r#  SSK$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-  SSK.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>  SSK?J@r@JArA  SSKBJCrCJDrDJErEJFrFJGrG  \R                  " SSS9rI\R                  " SSS9rJ " S S5      rK\K" 5       rL\R                  " S5      rNS\
 3rOSR                  \R                  " 5        V s/ s H  o S:w  d  M
  U PM     sn 5      rR " S S\R                  5      rT " S  S!\;5      rU " S" S#\/5      rV\R                  S$\R                  4   rY " S% S&5      rZ " S' S\Z5      r[ " S( S\Z5      r\gs  sn f ))    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
ProxyTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesSyncByteStreamTimeoutTypesURLTypesVerifyTypes)URLQueryParams)Timer
URLPatternget_environment_proxiesis_https_redirectsame_originTClient)boundUAsyncClientc                       \ rS rSrSrSrg)UseClientDefaultA   a  
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____firstlineno____doc____static_attributes__r@       3/venv/lib/python3.13/site-packages/httpx/_client.pyr>   r>   A   s    rG   r>   httpxzpython-httpx/z, identityc                        \ rS rSrSrSrSrSrg)ClientState`   r         r@   N)rA   rB   rC   rD   UNOPENEDOPENEDCLOSEDrF   r@   rG   rH   rL   rL   `   s     H F FrG   rL   c                   d    \ rS rSrSrS\S\S\SS4S jrS\	R                  \   4S	 jrSS
 jrSrg)BoundSyncStreamn   z
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                 (    Xl         X l        X0l        g N_stream	_response_timerselfrV   rW   rX   s       rH   __init__BoundSyncStream.__init__t        !rG   c              #   :   #    U R                    H  nUv   M	     g 7fr[   r]   ra   chunks     rH   __iter__BoundSyncStream.__iter__{   s     \\EK "s   c                     U R                   R                  5       n[        R                  " US9U R                  l        U R                  R                  5         g N)seconds)r_   sync_elapseddatetime	timedeltar^   elapsedr]   closera   rm   s     rH   rr   BoundSyncStream.close   s;    ++**,!)!3!3G!DrG   r^   r]   r_   rY   N)rA   rB   rC   rD   rE   r-   r   r3   rb   typingIteratorbytesri   rr   rF   r@   rG   rH   rT   rT   n   sF    
$08AF	&//%0 rG   rT   c                   d    \ rS rSrSrS\S\S\SS4S jrS\	R                  \   4S	 jrSS
 jrSrg)BoundAsyncStream   z
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.
rV   rW   rX   rY   Nc                 (    Xl         X l        X0l        g r[   r\   r`   s       rH   rb   BoundAsyncStream.__init__   rd   rG   c                J   #    U R                     S h  vN nU7v   M   N
 g 7fr[   rf   rg   s     rH   	__aiter__BoundAsyncStream.__aiter__   s     << 	%K	<s   #!!#!#c                    #    U R                   R                  5       I S h  vN n[        R                  " US9U R                  l        U R                  R                  5       I S h  vN   g  NJ N7frl   )r_   async_elapsedro   rp   r^   rq   r]   aclosers   s     rH   r   BoundAsyncStream.aclose   sO     1133!)!3!3G!Dll!!### 4#s"   A/A+AA/%A-&A/-A/ru   rv   )rA   rB   rC   rD   rE   r!   r   r3   rb   rw   AsyncIteratorry   r   r   rF   r@   rG   rH   r{   r{      sH    
%19BG	!5!5e!< $rG   r{   .c                      \ rS rSrSSSS\S\SSSSS.S\R                  \   S	\R                  \	   S
\R                  \
   S\R                  \   S\S\S\S\R                  \R                  \\R"                  \   4      S\S\S\R(                  \\R*                  \/\4   4   SS4S jjr\S\4S j5       r\S\4S j5       rS\S\4S jrS\R                  \   S\S\R<                  \\R                  \   4   4S jr \S\!4S j5       r"\"RF                  S\SS4S j5       r"\S\R<                  \\R"                  \   4   4S j5       r$\$RF                  S\R<                  \\R"                  \   4   SS4S j5       r$\S\R                  \%   4S  j5       r&\&RF                  S\SS4S! j5       r&\S\4S" j5       r'\'RF                  S\SS4S# j5       r'\S\(4S$ j5       r)\)RF                  S
\
SS4S% j5       r)\S\*4S& j5       r+\+RF                  S\SS4S' j5       r+\S\,4S( j5       r-\-RF                  S	\	SS4S) j5       r-SSSSSSS\.SS*.	S+\S\S,\R                  \/   S-\R                  \0   S.\R                  \1   S/\R                  \Rd                     S	\R                  \	   S
\R                  \
   S\R                  \   S\R(                  \\34   S0\R                  \4   S\54S1 jjr6S\S\4S2 jr7 S@S\R                  \   S\R                  \   4S3 jjr8 S@S
\R                  \
   S\R                  \
   4S4 jjr9 S@S	\R                  \	   S\R                  \	   4S5 jjr:S\R                  \   S\R                  \%   4S6 jr;\.4S7\5S\R(                  \\3S4   S\%4S8 jjr<S7\5S9\=S\54S: jr>S7\5S9\=S\4S; jr?S7\5S9\=S\4S< jr@S7\5S\S+\S\(4S= jrAS7\5S+\S\R                  \R(                  \B\C4      4S> jrDS?rEg)A
BaseClient   NF 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   rY   c                   Uc  0 OUnU R                  [        U	5      5      U l        U R                  U5      U l        [        U5      U l        [        U5      U l        [        U5      U l
        [        U5      U l        X`l        Xpl        [        UR!                  S/ 5      5      [        UR!                  S/ 5      5      S.U l        Xl        Xl        [(        R*                  U l        g NrequestrW   )r   rW   )_enforce_trailing_slashr1   	_base_url_build_auth_authr2   _paramsr   r   r   _cookiesr   _timeoutr   r   listget_event_hooks
_trust_env_default_encodingrL   rP   _state)ra   r   r   r   r   r   r   r   r   r   r   r   s               rH   rb   BaseClient.__init__   s    " (/b[55c(mD%%d+
"6*w'(( 0*KOOIr:;[__Z<=
 $!1!**rG   c                 <    U R                   [        R                  :H  $ )z"
Check if the client being closed
)r   rL   rR   ra   s    rH   	is_closedBaseClient.is_closed   s    
 {{k0000rG   c                     U R                   $ r[   )r   r   s    rH   r   BaseClient.trust_env   s    rG   urlc                 ~    UR                   R                  S5      (       a  U$ UR                  UR                   S-   S9$ )N   /raw_path)r   endswith	copy_withra   r   s     rH   r   "BaseClient._enforce_trailing_slash   s6    <<  &&J}}cllT&9}::rG   proxiesallow_env_proxiesc           	         UcB  U(       a9  [        5       R                  5        VVs0 s H  u  p4X4c  S O[        US9_M     snn$ 0 $ [        U[        5      (       aP  0 nUR                  5        H8  u  p6[        U[
        [        45      (       a	  [        US9OUnXu[        U5      '   M:     U$ [        U[
        [        45      (       a	  [        US9OUnSU0$ s  snnf )N)r   zall://)r5   itemsr   
isinstancedictstrr1   )ra   r   r   keyr   new_proxiesvalueproxys           rH   _get_proxy_mapBaseClient._get_proxy_map   s     ?  %<$=$C$C$E$E %C.@$E  Igt$$K%mmo
,6usCj,I,I%(u(-CH% . *4WsCj*I*IEg&wEe$$s   Cc                     U R                   $ r[   )r   r   s    rH   r   BaseClient.timeout   s    }}rG   c                 $    [        U5      U l        g r[   )r   r   )ra   r   s     rH   r   r          (rG   c                     U R                   $ r[   )r   r   s    rH   r   BaseClient.event_hooks   s       rG   c                 |    [        UR                  S/ 5      5      [        UR                  S/ 5      5      S.U l        g r   )r   r   r   )ra   r   s     rH   r   r      s4    
 KOOIr:;[__Z<=
rG   c                     U R                   $ )z
Authentication class used when none is passed at the request-level.

See also [Authentication][0].

[0]: /quickstart/#authentication
)r   r   s    rH   r   BaseClient.auth   s     zzrG   c                 0    U R                  U5      U l        g r[   )r   r   ra   r   s     rH   r   r     s    %%d+
rG   c                     U R                   $ )z;
Base URL to use when sending requests with relative URLs.
)r   r   s    rH   r   BaseClient.base_url  s    
 ~~rG   c                 B    U R                  [        U5      5      U l        g r[   )r   r1   r   r   s     rH   r   r     s    55c#h?rG   c                     U R                   $ )z0
HTTP headers to include when sending requests.
)_headersr   s    rH   r   BaseClient.headers      
 }}rG   c                     [        S[        R                  S5      S[        R                  S5      S.5      nUR	                  U5        X l        g )Ns   */*asciis
   keep-alive)s   Accepts   Accept-Encodings
   Connections
   User-Agent)r   ACCEPT_ENCODINGencode
USER_AGENTupdater   )ra   r   client_headerss      rH   r   r     sH     !$3$:$:7$C,)009	
 	g&&rG   c                     U R                   $ )z1
Cookie values to include when sending requests.
)r   r   s    rH   r   BaseClient.cookies+  r   rG   c                 $    [        U5      U l        g r[   )r   r   )ra   r   s     rH   r   r   2  r   rG   c                     U R                   $ )z?
Query parameters to include in the URL when sending requests.
)r   r   s    rH   r   BaseClient.params6  s    
 ||rG   c                 $    [        U5      U l        g r[   )r2   r   )ra   r   s     rH   r   r   =  s    "6*rG   )	contentdatafilesjsonr   r   r   r   
extensionsmethodr   r   r   r   r   c       	         Z   U R                  U5      nU R                  U5      nU R                  U	5      n	U R                  U5      nUc  0 OUnSU;  aI  [	        U
[
        5      (       a  U R                  O
[        U
5      n
[        S0 UDSU
R                  5       0D6n[        UUUUUUUUU	US9
$ )a  
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
r   )r   r   r   r   r   r   r   r   r@   )
_merge_url_merge_headers_merge_cookies_merge_queryparamsr   r>   r   r   r   as_dictr   )ra   r   r   r   r   r   r   r   r   r   r   r   s               rH   build_requestBaseClient.build_requestA  s    4 ooc"%%g.%%g.((0%-R:
J& g'788 W% 
 F
FGOO4EFJ!
 	
rG   c                     [        U5      nUR                  (       aK  U R                  R                  UR                  R	                  S5      -   nU R                  R                  US9$ U$ )zs
Merge a URL argument together with any 'base_url' on the client,
to create the URL used for the outgoing request.
r   r   )r1   is_relative_urlr   r   lstripr   )ra   r   	merge_urlmerge_raw_paths       rH   r   BaseClient._merge_urlt  s\    
 H	$$ "]]33i6H6H6O6OPT6UUN==**N*CCrG   c                     U(       d  U R                   (       a(  [        U R                   5      nUR                  U5        U$ U$ )zx
Merge a cookies argument together with any cookies on the client,
to create the cookies used for the outgoing request.
)r   r   r   )ra   r   merged_cookiess      rH   r   BaseClient._merge_cookies  s4     dll$T\\2N!!'*!!rG   c                 R    [        U R                  5      nUR                  U5        U$ )zx
Merge a headers argument together with any headers on the client,
to create the headers used for the outgoing request.
)r   r   r   )ra   r   merged_headerss      rH   r   BaseClient._merge_headers  s&     !.g&rG   c                     U(       d  U R                   (       a&  [        U R                   5      nUR                  U5      $ U$ )z
Merge a queryparams argument together with any queryparams on the client,
to create the queryparams used for the outgoing request.
)r   r2   merge)ra   r   merged_queryparamss      rH   r   BaseClient._merge_queryparams  s2     T[[!,T[[!9%++F33rG   c                     Uc  g [        U[        5      (       a  [        US   US   S9$ [        U[        5      (       a  U$ [	        U5      (       a	  [        US9$ [        SU< 35      e)Nr   r   usernamepassword)funczInvalid "auth" argument: )r   tupler	   r   callabler
   	TypeErrorr   s     rH   r   BaseClient._build_auth  se    <e$$d1gQ@@d##Kd^^T**7x@AArG   r   c                    [        U[        5      (       a  U R                  OU R                  U5      nUb  U$ UR                  R
                  UR                  R                  pCU(       d  U(       a	  [        X4S9$ [        5       $ )Nr  )	r   r>   r   r   r   r  r  r	   r   )ra   r   r   r  r  s        rH   _build_request_authBaseClient._build_request_auth  sj     %T+;<<DJJ$BRBRSWBX 	 K$[[117;;3G3G(xhBBvrG   rW   c           	          U R                  X5      nU R                  X5      nU R                  XU5      nU R                  X5      n[	        U R
                  5      n[        UUUUUUR                  S9$ )zk
Given a request and a redirect response, return a new request that
should be used to effect the redirect.
)r   r   r   r   rV   r   )_redirect_method_redirect_url_redirect_headers_redirect_streamr   r   r   r   )ra   r   rW   r   r   r   rV   r   s           rH   _build_redirect_request"BaseClient._build_redirect_request  sy    
 &&w9  3((v>&&w7$,,'))
 	
rG   c                    UR                   nUR                  [        R                  :X  a  US:w  a  SnUR                  [        R                  :X  a  US:w  a  SnUR                  [        R
                  :X  a  US:X  a  SnU$ )zs
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)ra   r   rW   r   s       rH   r  BaseClient._redirect_method  st    
  5??2v7GF 5;;.6V3CF 5#:#::v?OFrG   c                    UR                   S   n [        U5      nUR                  (       a4  UR
                  (       d#  UR                  UR                  R
                  S9nUR                  (       a  UR                  R                  U5      nUR                  R                  (       a4  UR                  (       d#  UR                  UR                  R                  S9nU$ ! [         a  n[        SU S3US9SeSnAff = f)z,
Return the URL for the redirect to follow.
Locationz Invalid URL in location header: .r   N)host)fragment)r   r1   r   r   schemer"  r   r   r   joinr#  )ra   r   rW   locationr   excs         rH   r  BaseClient._redirect_url  s     ##J/	h-C ::chh--W[[%5%5-6C ++""3'C ;;--)=)=->C
'  	%23%q97	s   C 
C<(C77C<c                    [        UR                  5      n[        X!R                  5      (       dK  [	        UR                  U5      (       d  UR                  SS5        UR                  R                  S5      US'   X1R                  :w  a*  US:X  a$  UR                  SS5        UR                  SS5        UR                  SS5        U$ )	zB
Return the headers that should be used for the redirect request.
AuthorizationNr   Hostr  zContent-LengthzTransfer-EncodingCookie)	r   r   r7   r   r6   popnetlocdecoder   )ra   r   r   r   r   s        rH   r  BaseClient._redirect_headers  s     '//*3,,$W[[#66 OT2 "jj//8GFO^^#% KK($/KK+T2 	Hd#rG   c                 F    X!R                   :w  a  US:X  a  gUR                  $ )z?
Return the body that should be used for the redirect request.
r  N)r   rV   )ra   r   r   s      rH   r  BaseClient._redirect_stream.  s!     ^^#%~~rG   )r   r   r   r   r   r   r   r   r   r   r   r   r   r[   )FrA   rB   rC   rD   r   r   rw   Optionalr"   r(   r%   r$   r.   boolintMappingr   List	EventHookr/   UnionCallablery   rb   propertyr   r   r1   r   r&   Dictr   r   r   r   setterr   r   r   r   r   r   r   r   r2   r   USE_CLIENT_DEFAULTr)   r*   r,   Anyr>   r+   r   r   r   r   r   r   r   r  r   r  r  r  r  r-   r!   r  rF   r@   rG   rH   r   r      s%    ,0370404 6!&2 MT"+ ooi("+ 0	"+
 -"+ -"+ "+ "+ "+ __NN3I 667
"+ "+ "+ !,,sFOOUGSL,I'IJ"+  
!"+H 14 1 1 4  ;3 ;3 ;
%|4%IM%	S&//%00	1%(    ^^)| ) ) ) !V[[fkk).D)DE ! ! 
!;;sFKK	,B'BC
	
 
 food+   
[[, ,t , , #   __@H @ @ @    ^^
'{ 
't 
' 
'    ^^){ )t ) )    ]]+_ + + + 48-1/3,0370404@R9=1
1
 1

 01
 ook*1
 |,1
 oofjj)1
 01
 -1
 -1
 l,<<=1
 OO$561
 
1
fh 3 . 7;{3		% 7;	{3			%	 :>
ooo6
		)

B	 : 
Bvt?T 
B AS ll9&6<= 
	$
w 
( 
w 
& 8  .W  S : s C G 6		(+		no&EF	G	rG   r   c            /         ^  \ rS rSrSrSSSSSSSSSSS\S\\SSSSSSS.S	\R                  \
   S
\R                  \   S\R                  \   S\R                  \   S\S\R                  \   S\S\S\R                  \   S\R                  \   S\R                  \R&                  \\R                  \   4      S\S\S\S\S\R                  \R&                  \\R2                  \   4      S\S\R                  \   S\R                  \R8                  S\R:                  4      S\S\R<                  \\R8                  \/\4   4   SS4,U 4S  jjjr SSSS\SSS4S\S\R                  \   S\S\S\S\R                  \   S\R                  \R8                  S\R:                  4      S\S\4S! jjr!SSSS\S4S\"S\S\R                  \   S\S\S\S\S\4S" jjr#S#\$S\4S$ jr%SSSSSSS\&\&\&SS%.S&\S#\S'\R                  \'   S(\R                  \(   S)\R                  \)   S*\R                  \R:                     S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*S4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S, jjr-\.SSSSSSS\&\&\&SS%.S&\S#\S'\R                  \'   S(\R                  \(   S)\R                  \)   S*\R                  \R:                     S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*S4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\R^                  \,   4S- jj5       r0S\&\&S..S/\1S0\S	\R<                  \
\*S4   S\R<                  \\*4   S\,4
S1 jjr2S/\1S	\3S\S2\R2                  \,   S\,4
S3 jr4S/\1S\S2\R2                  \,   S\,4S4 jr5S/\1S\,4S5 jr6SSS\&\&\&SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S7 jjr7SSS\&\&\&SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S8 jjr8SSS\&\&\&SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S9 jjr9SSSSSSS\&\&\&SS%.S#\S'\R                  \'   S(\R                  \(   S)\R                  \)   S*\R                  \R:                     S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S: jjr:SSSSSSS\&\&\&SS%.S#\S'\R                  \'   S(\R                  \(   S)\R                  \)   S*\R                  \R:                     S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S; jjr;SSSSSSS\&\&\&SS%.S#\S'\R                  \'   S(\R                  \(   S)\R                  \)   S*\R                  \R:                     S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S< jjr<SSS\&\&\&SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R<                  \
\*4   S\R<                  \\*4   S\R<                  \\*4   S+\R                  \+   S\,4S= jjr=SFS> jr>S?\?S\?4S@ jr@   SGSA\R                  \R                  \B      SB\R                  \B   SC\R                  \C   SS4SD jjrDSErEU =rF$ )Hr9   i:  aj  
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).
* **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
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   r   mountsr   r   limitsr   r   r   	transportappr   r   r   r   r   r   rB  rC  rD  rE  r   r   rF  r   r   rG  r   r   r   rH  rI  .r   r   rY   c                4  > [         TU ]  UUUUUUUUUUUS9  U(       a   SS KnU
(       a/  Sn[        R
                  " U[        5        U	(       a  [        S5      eU=(       a    US L =(       a    US L nU R                  U
=(       d    U	U5      nU R                  UUUUUUUUS9U l
        UR                  5        VV	s0 s H*  u  nn	[        U5      U	c  S OU R                  U	UUUUUUS9_M,     sn	nU l        UbI  U R                  R                  UR                  5        VVs0 s H  u  nn[        U5      U_M     snn5        [!        [#        U R                  R                  5       5      5      U l        g ! [         a    [        S5      S ef = fs  sn	nf s  snnf Nr   r   zuUsing http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.zJThe 'proxies' argument is now deprecated. Use 'proxy' or 'mounts' instead.z*Use either `proxy` or 'proxies', not both.)rB  rC  rD  rE  rG  rH  rI  r   rB  rC  rD  rE  rG  r   superrb   h2ImportErrorwarningswarnDeprecationWarningRuntimeErrorr   _init_transport
_transportr   r4   _init_proxy_transport_mountsr   r   sortedra   r   r   r   r   rB  rC  rD  rE  r   r   rF  r   r   rG  r   r   r   rH  rI  r   r   rO  messager   	proxy_mapr   	__class__s                              rH   rb   Client.__init__n  s   : 	-'#- 	 	
  4  MM'#56"#OPP%K#+K)t:K''(85:KL	.. / 	
, (oo/Q
 0
U sO} "++# , 
 0Q
 LLBH,,.Q.YC)+.Q F4<<#5#5#789_  !S 8Q
  R   E4 <1F!F
4Fc	           	      @    Ub  U$ Ub	  [        US9$ [        UUUUUUS9$ N)rI  rL  )r    r   	ra   rB  rC  rD  rE  rG  rH  rI  r   s	            rH   rU  Client._init_transport  s?      ? S))
 	
rG   c           
           [        UUUUUUUS9$ )N)rB  rC  rD  rE  rG  r   r   )r   ra   r   rB  rC  rD  rE  rG  r   s           rH   rW  Client._init_proxy_transport  s&     
 	
rG   r   c                     U R                   R                  5        H0  u  p#UR                  U5      (       d  M  Uc  U R                  s  $ Us  $    U R                  $ z
Returns the transport instance that should be used for a given URL.
This will either be the standard connection pool, or a proxy.
rX  r   matchesrV  ra   r   patternrH  s       rH   _transport_for_urlClient._transport_for_url  M    
 #',,"4"4"6Gs##*3*;tJJ #7 rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                    U	b  Sn[         R                  " U[        5        U R                  UUUUUUUUU	UUS9nU R	                  XUS9$ )aI  
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
zSetting 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   )rQ  rR  rS  r   send)ra   r   r   r   r   r   r   r   r   r   r   r   r   r   r[  r   s                   rH   r   Client.request  ss    B C 
 MM'#56$$! % 
 yy>NyOOrG   c             #      #    U R                  UUUUUUUUU	UUS9nU R                  UU
USS9n Uv   UR                  5         g! UR                  5         f = f7f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
rr  T)r   r   r   rV   N)r   rt  rr   ra   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rW   s                   rH   rV   Client.stream>  s|     8 $$! % 
 99-	  
	NNNHNNs   ,AA AAArV   r   r   r   rV   c                   U R                   [        R                  :X  a  [        S5      e[        R                  U l         [        U[        5      (       a  U R                  OUnU R                  X5      nU R                  UUU/ S9n U(       d  UR                  5         U$ ! [         a  nUR                  5         UeSnAff = f)aC  
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   rL   rR   rT  rQ   r   r>   r   r  _send_handling_authreadBaseExceptionrr   ra   r   rV   r   r   rW   r'  s          rH   rt  Client.sendr  s    * ;;+,,,VWW!(( *,<== !!! 	 ''6++-	 , 
	O 	NNI	s   B 
C )B;;C r~  c                    UR                  U5      n [        U5      n U R                  UUUS9n  UR                  U5      n[        U5      Ul        UR                  5         UnUR                  U5        MY  ! [         a    Us UR                  5         $ f = f! [         a  nUR                  5         UeS nAff = f! UR                  5         f = fN)r   r~  )sync_auth_flownext_send_handling_redirectsrt  StopIterationrr   r   r~  r  appendr  	ra   r   r   r   r~  	auth_flowrW   next_requestr'  s	            rH   r  Client._send_handling_auth  s     ''0		9oG88%5# 9 
('0~~h'? (,G}H$MMO*GNN8,  ) (' OO( % NN$I OOsL   B> A8 3B 6B> 8BB BB 
B;$B66B;;B> >Cc                     [        U5      U R                  :  a
  [        SUS9eU R                  S    H  nU" U5        M     U R	                  U5      n U R                  S    H  nU" U5        M     [        U5      Ul        UR                  (       d  U$ U R                  X5      nX5/-   nU(       a  UR                  5         OXl
        U$ M  ! [         a  nUR                  5         UeS nAff = fNz#Exceeded maximum allowed redirects.r!  r   rW   )lenr   r   r   _send_single_requestr   r~  has_redirect_locationr  r  r  r  rr   ra   r   r   r~  hookrW   r'  s          rH   r  Client._send_handling_redirects  s     7|d000&97  )))4W 5 009H --j9DN :#'= 55#O66wI!J.#MMO,3)#O3 6 !  	s%   A C -C C 
C/C**C/c                    U R                  UR                  5      n[        5       nUR                  5         [	        UR
                  [        5      (       d  [        S5      e[        US9   UR                  U5      nSSS5        [	        WR
                  [        5      (       d   eXl
        [        UR
                  XCS9Ul        U R                  R                  U5        U R                  Ul        [         R#                  SUR$                  UR                  UR&                  UR(                  UR*                  5        U$ ! , (       d  f       N= f)<
Sends a single request, without handling any redirections.
z?Attempted to send an async request with a sync Client instance.r!  NrW   rX   HTTP Request: %s %s "%s %d %s")rm  r   r3   
sync_startr   rV   r-   rT  r   handle_requestr   rT   r   extract_cookiesr   r   loggerinfor   http_versionr  reason_phrasera   r   rH  rX   rW   s        rH   r  Client._send_single_request  s	    ++GKK8	'...99Q  W- //8H . (//>::::")OOh
 	$$X.$($:$:!,NNKK!!  ""	
 + .-s   )D==
Er   r   r   r   r   r   r   c                0    U R                  SUUUUUUUUS9	$ )=
Send a `GET` request.

**Parameters**: See `httpx.request`.
r  r  r!  	ra   r   r   r   r   r   r   r   r   s	            rH   r   
Client.get  s5    " ||-!  

 
	
rG   c                0    U R                  SUUUUUUUUS9	$ )B
Send an `OPTIONS` request.

**Parameters**: See `httpx.request`.
OPTIONSr  r!  r  s	            rH   optionsClient.options+  s5    " ||-!  

 
	
rG   c                0    U R                  SUUUUUUUUS9	$ )>
Send a `HEAD` request.

**Parameters**: See `httpx.request`.
r  r  r!  r  s	            rH   headClient.headH  s5    " ||-!  

 
	
rG   c                8    U R                  SUUUUUUUUU	U
UUS9$ )>
Send a `POST` request.

**Parameters**: See `httpx.request`.
r  rp  r!  ra   r   r   r   r   r   r   r   r   r   r   r   r   s                rH   postClient.poste  sA    * ||-!  
 	
rG   c                8    U R                  SUUUUUUUUU	U
UUS9$ )=
Send a `PUT` request.

**Parameters**: See `httpx.request`.
PUTrp  r!  r  s                rH   put
Client.put  sA    * ||-!  
 	
rG   c                8    U R                  SUUUUUUUUU	U
UUS9$ )?
Send a `PATCH` request.

**Parameters**: See `httpx.request`.
PATCHrp  r!  r  s                rH   patchClient.patch  sA    * ||-!  
 	
rG   c                0    U R                  SUUUUUUUUS9	$ )@
Send a `DELETE` request.

**Parameters**: See `httpx.request`.
DELETEr  r!  r  s	            rH   deleteClient.delete  s5    " ||-!  

 
	
rG   c                    U R                   [        R                  :w  af  [        R                  U l         U R                  R	                  5         U R
                  R                  5        H  nUc  M  UR	                  5         M     ggz
Close transport and proxies.
N)r   rL   rR   rV  rr   rX  values)ra   rH  s     rH   rr   Client.close  s_     ;;+,,,%,,DKOO!!#!\\002	(OO% 3	 -rG   ra   c                    U R                   [        R                  :w  a:  [        R                  S[        R                  S0U R                      n[        U5      e[        R                  U l         U R                  R                  5         U R                  R                  5        H  nUc  M  UR                  5         M     U $ Nz-Cannot open a client instance more than once.z9Cannot reopen a client instance, once it has been closed.)
r   rL   rP   rQ   rR   rT  rV  	__enter__rX  r  )ra   msgrH  s      rH   r  Client.__enter__  s    ;;+...""$S""O
 kkC s##!((!!#,,.I$##% / rG   exc_type	exc_value	tracebackc                     [         R                  U l        U R                  R	                  XU5        U R
                  R                  5        H  nUc  M  UR	                  XU5        M     g r[   )rL   rR   r   rV  __exit__rX  r  )ra   r  r  r  rH  s        rH   r  Client.__exit__  sR     "((  i@,,.I$""8	B /rG   rX  r   rV  rv   NNN)GrA   rB   rC   rD   rE   r   r   r   rw   r3  r"   r(   r%   r$   r0   r#   r4  r'   r&   r6  r   r   r.   r   r5  r7  r8  r/   r:  r?  r9  ry   rb   rU  r   rW  r1   rm  r>  r)   r*   r,   r>   r+   r   r   r   rx   rV   r   rt  r   r  r  r  r   r  r  r  r  r  r  rr   r8   r  Typer  r   r  rF   __classcell__r]  s   @rH   r9   r9   :  s   1l ,0370404"+/-115  6!&'2 48AEMT7]: ooi(]: 0	]:
 -]: -]: ]: ooi(]: ]: ]: z*]: .]: NN3 >>?
]:  !]:" #]:$ %]:& ']:( __NN3I 667
)]:. /]:0 ??=11]:2 __V__S&**_=>3]:4 5]:6 !,,sFOOUGSL,I'IJ7]:8 
9]: ]:B #+/'48AE

 ooi(
 	

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

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

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

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

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

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

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

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

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

:
& a ( AE4848	C//&++m"<=C ??=1C ??=1	C
 
C CrG   c            /         ^  \ rS rSrSrSSSSSSSSSSS\S\\SSSSSSS.S	\R                  \
   S
\R                  \   S\R                  \   S\R                  \   S\S\R                  \   S\S\S\R                  \   S\R                  \   S\R                  \R&                  \\R                  \   4      S\S\S\S\S\R                  \R&                  \\R2                  \R4                  S\R6                  4      4      S\S\R                  \   S\R                  \R4                  S\R6                  4      S\S\R:                  \\R4                  \/\4   4   SS4,U 4S  jjjrSSSS\SSS4S\S\R                  \   S\S\S\S\R                  \   S\R                  \R4                  S\R6                  4      S\S\4S! jjr SSSS\S4S\!S\S\R                  \   S\S\S\S\S\4S" jjr"S#\#S\4S$ jr$SSSSSSS\%\%\%SS%.S&\S#\S'\R                  \&   S(\R                  \'   S)\R                  \(   S*\R                  \R6                     S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)S4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S, jjr,\-SSSSSSS\%\%\%SS%.S&\S#\S'\R                  \&   S(\R                  \'   S)\R                  \(   S*\R                  \R6                     S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\R\                  \+   4S- jj5       r/S\%\%S..S/\0S0\S	\R:                  \
\)S4   S\R:                  \\)4   S\+4
S1 jjr1S/\0S	\2S\S2\R2                  \+   S\+4
S3 jr3S/\0S\S2\R2                  \+   S\+4S4 jr4S/\0S\+4S5 jr5SSS\%\%\%SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)S4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S7 jjr6SSS\%\%\%SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S8 jjr7SSS\%\%\%SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S9 jjr8SSSSSSS\%\%\%SS%.S#\S'\R                  \&   S(\R                  \'   S)\R                  \(   S*\R                  \R6                     S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S: jjr9SSSSSSS\%\%\%SS%.S#\S'\R                  \&   S(\R                  \'   S)\R                  \(   S*\R                  \R6                     S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S; jjr:SSSSSSS\%\%\%SS%.S#\S'\R                  \&   S(\R                  \'   S)\R                  \(   S*\R                  \R6                     S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S< jjr;SSS\%\%\%SS6.S#\S
\R                  \   S\R                  \   S\R                  \   S	\R:                  \
\)4   S\R:                  \\)4   S\R:                  \\)4   S+\R                  \*   S\+4S= jjr<SFS> jr=S?\>S\>4S@ jr?   SGSA\R                  \R                  \A      SB\R                  \A   SC\R                  \B   SS4SD jjrCSErDU =rE$ )Hr<   i  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, 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).
* **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
* **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   rA  r   r   r   r   rB  rC  rD  rE  r   r   rF  r   r   rG  r   r   .r   rH  rI  r   r   rY   c                4  > [         TU ]  UUUUUUUUUUUS9  U(       a   SS KnU
(       a/  Sn[        R
                  " U[        5        U	(       a  [        S5      eU=(       a    US L =(       a    US L nU R                  U
=(       d    U	U5      nU R                  UUUUUUUUS9U l
        UR                  5        VV	s0 s H*  u  nn	[        U5      U	c  S OU R                  U	UUUUUUS9_M,     sn	nU l        UbI  U R                  R                  UR                  5        VVs0 s H  u  nn[        U5      U_M     snn5        [!        [#        U R                  R                  5       5      5      U l        g ! [         a    [        S5      S ef = fs  sn	nf s  snnf rK  rM  rZ  s                              rH   rb   AsyncClient.__init__R  s   : 	-'#- 	 	
  4  MM'#56"#OPP%K#+K)t:K''(85:KL	.. / 	
. (oo/V
 0
U sO} "++# , 
 0V
 LLBH,,.Q.YC)+.Q F4<<#5#5#789_  !S :V
  Rr_  c	           	      @    Ub  U$ Ub	  [        US9$ [        UUUUUUS9$ ra  )r   r   rb  s	            rH   rU  AsyncClient._init_transport  s?      ? S))!
 	
rG   c           	          [        UUUUUUS9$ )N)rB  rC  rE  rG  r   r   )r   re  s           rH   rW  !AsyncClient._init_proxy_transport  s#     "
 	
rG   r   c                     U R                   R                  5        H0  u  p#UR                  U5      (       d  M  Uc  U R                  s  $ Us  $    U R                  $ rh  ri  rk  s       rH   rm  AsyncClient._transport_for_url  ro  rG   rp  r   r   r   r   r   r   c                p   #    U R                  UUUUUUUUU	UUS9nU R                  XUS9I Sh  vN $  N7f)aY  
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
rr  rs  N)r   rt  )ra   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s                  rH   r   AsyncClient.request  sZ     B $$! % 
 YYwDTYUUUUs   -646c                  #    U R                  UUUUUUUUU	UUS9nU R                  UU
USS9I Sh  vN n U7v   UR                  5       I Sh  vN   g N# N! UR                  5       I Sh  vN    f = f7frw  )r   rt  r   rx  s                   rH   rV   AsyncClient.stream  s     8 $$! % 
 -	 # 
 
	$N//###
 $(//###sC   /A7AA7A A7AA7A7A4-A0.A44A7rz  r   rV   c                  #    U R                   [        R                  :X  a  [        S5      e[        R                  U l         [        U[        5      (       a  U R                  OUnU R                  X5      nU R                  UUU/ S9I Sh  vN n U(       d  UR                  5       I Sh  vN   U$  N& N! [         a   nUR                  5       I Sh  vN    UeSnAff = f7f)aH  
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
r|  r}  N)r   rL   rR   rT  rQ   r   r>   r   r  r  areadr  r   r  s          rH   rt  AsyncClient.sendM  s     * ;;+,,,VWW!(( *,<== !!! 	 ''611-	 2 
 
	nn&&&O
 '  	//###I	sT   BC"
B1C"B5 *B3+B5 0C"3B5 5
C?CCCCC"r~  c                 >  #    UR                  U5      n UR                  5       I S h  vN n U R                  UUUS9I S h  vN n  UR                  U5      I S h  vN n[        U5      Ul        UR                  5       I S h  vN   UnUR                  U5        Mq   Nv N^ NE! [         a    Us UR                  5       I S h  vN    $ f = f NJ! [         a   nUR                  5       I S h  vN    UeS nAff = f! UR                  5       I S h  vN    f = f7fr  )async_auth_flow	__anext__r  asendStopAsyncIterationr   r   r~  r  r  r  r  s	            rH   r  AsyncClient._send_handling_auth~  s     ((1		%%//11G!%!>!>%5# "? " 
(-6__X-F'F (,G}H$"..****GNN8,  2 (G- (' ""$$$( + % "//+++I ""$$$s   DC? BC? B!C? 	B% B#B% "#C CC C? !C? #B% %C1C 2DCDCC 
C<C7/C20C77C<<C? ?DDDDc                 N  #     [        U5      U R                  :  a
  [        SUS9eU R                  S    H  nU" U5      I S h  vN   M     U R	                  U5      I S h  vN n U R                  S    H  nU" U5      I S h  vN   M     [        U5      Ul        UR                  (       d  U$ U R                  X5      nX5/-   nU(       a  UR                  5       I S h  vN   OXl
        U$ M   N N No N! [         a   nUR                  5       I S h  vN    UeS nAff = f7fr  )r  r   r   r   r  r   r~  r  r  r  r  r  r   r  s          rH   r  $AsyncClient._send_handling_redirects  s     7|d000&97  )))47m## 5 "66w??H --j9Dx.(( : $(= 55#O66wI!J.#"..***,3)#O5  $? ) +
 ! oo'''	s   AD%C0D%!C2"D%'C8 C4*C8 /D%00C8  C6!C8 %D%&C8 -D%2D%4C8 6C8 8
D"DDDD""D%c                   #    U R                  UR                  5      n[        5       nUR                  5       I Sh  vN   [	        UR
                  [        5      (       d  [        S5      e[        US9   UR                  U5      I Sh  vN nSSS5        [	        WR
                  [        5      (       d   eXl
        [        UR
                  XCS9Ul        U R                  R                  U5        U R                  Ul        [         R#                  SUR$                  UR                  UR&                  UR(                  UR*                  5        U$  GN N! , (       d  f       N= f7f)r  Nz?Attempted to send an sync request with an AsyncClient instance.r!  r  r  )rm  r   r3   async_startr   rV   r!   rT  r   handle_async_requestr   r{   r   r  r   r   r  r  r   r  r  r  r  s        rH   r   AsyncClient._send_single_request  s     ++GKK8	!!!'../::Q  W-&;;GDDH . (//?;;;;"*OOh
 	$$X.$($:$:!,NNKK!!  ""	
 7 	" E .-s:   9E%E7E%3EE	ECE%E
E"E%r  c                L   #    U R                  SUUUUUUUUS9	I Sh  vN $  N7f)r  r  r  Nr!  r  s	            rH   r   AsyncClient.get  sB     " \\-! " 

 

 
	
 

   $"$c                L   #    U R                  SUUUUUUUUS9	I Sh  vN $  N7f)r  r  r  Nr!  r  s	            rH   r  AsyncClient.options  sB     " \\-! " 

 

 
	
 

r  c                L   #    U R                  SUUUUUUUUS9	I Sh  vN $  N7f)r  r  r  Nr!  r  s	            rH   r  AsyncClient.head#  sB     " \\-! " 

 

 
	
 

r  c                T   #    U R                  SUUUUUUUUU	U
UUS9I Sh  vN $  N7f)r  r  rp  Nr!  r  s                rH   r  AsyncClient.post@  sN     * \\-! " 
 
 	
 
   (&(c                T   #    U R                  SUUUUUUUUU	U
UUS9I Sh  vN $  N7f)r  r  rp  Nr!  r  s                rH   r  AsyncClient.pute  sN     * \\-! " 
 
 	
 
r  c                T   #    U R                  SUUUUUUUUU	U
UUS9I Sh  vN $  N7f)r  r  rp  Nr!  r  s                rH   r  AsyncClient.patch  sN     * \\-! " 
 
 	
 
r  c                L   #    U R                  SUUUUUUUUS9	I Sh  vN $  N7f)r  r  r  Nr!  r  s	            rH   r  AsyncClient.delete  sB     " \\-! " 

 

 
	
 

r  c                 <  #    U R                   [        R                  :w  av  [        R                  U l         U R                  R	                  5       I Sh  vN   U R
                  R                  5        H   nUc  M  UR	                  5       I Sh  vN   M"     gg ND N7fr  )r   rL   rR   rV  r   rX  r  )ra   r   s     rH   r   AsyncClient.aclose  sw      ;;+,,,%,,DK//((***,,.$,,.(( /	 - + )s*   ABB"B:BBBBra   c                   #    U R                   [        R                  :w  a:  [        R                  S[        R                  S0U R                      n[        U5      e[        R                  U l         U R                  R                  5       I S h  vN   U R                  R                  5        H   nUc  M  UR                  5       I S h  vN   M"     U $  ND N7fr  )
r   rL   rP   rQ   rR   rT  rV  
__aenter__rX  r  )ra   r  r   s      rH   r	  AsyncClient.__aenter__  s     ;;+...""$S""O
 kkC s##!((oo((***\\((*E &&((( + 	 	+ )s*   BCC"C4CCCCr  r  r  c                   #    [         R                  U l        U R                  R	                  XU5      I S h  vN   U R
                  R                  5        H"  nUc  M  UR	                  XU5      I S h  vN   M$     g  NE N7fr[   )rL   rR   r   rV  	__aexit__rX  r  )ra   r  r  r  r   s        rH   r  AsyncClient.__aexit__  sk      "((oo''YGGG\\((*E ooh9EEE + 	H Fs'   5BA="BB3A?4
B?Br  rv   r  )FrA   rB   rC   rD   rE   r   r   r   rw   r3  r"   r(   r%   r$   r0   r#   r4  r'   r&   r6  r   r   r.   r   r5  r7  r:  r?  r/   r9  ry   rb   rU  r   rW  r1   rm  r>  r)   r*   r,   r>   r+   r   r   r   r   rV   r   rt  r   r  r  r  r   r  r  r  r  r  r  r   r;   r	  r  r  r   r  rF   r  r  s   @rH   r<   r<     s   2n ,0370404"+/-115  6!&'2 9=AEMT7]: ooi(]: 0	]:
 -]: -]: ]: ooi(]: ]: ]: z*]: .]: NN30B CCD
]:  !]:" #]:$ %]:& ']:( __NN3FOOCO,L MMN
)]:. /]:0 ??#561]:2 __V__S&**_=>3]:4 5]:6 !,,sFOOUGSL,I'IJ7]:8 
9]: ]:B #+/'9=AE

 ooi(
 	

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

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

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

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

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

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

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

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

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

:
)q Q ( AE4848	F//&++m"<=F ??=1F ??=1	F
 
F FrG   )]ro   enumloggingrw   rQ  
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/   r0   _urlsr1   r2   _utilsr3   r4   r5   r6   r7   TypeVarr8   r;   r>   r>  	getLoggerr  r   r%  keysr   EnumrL   rT   r{   r:  r?  r8  r   r9   r<   )r   s   0rH   <module>r"     su        :  $ 0 0  *  9 8   + ? B +    $ $  NN3h'
NN3m, ( &'  
		7	#[M*
))&++-C-S
1BS-C
$)) n .$ $. OOCO,	X Xv`CZ `CFXF* XFC& Ds   %	F&2F&