+
    Q?j&                      ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	H
t
 ^ RIHtHt ^ RIHt ^RIHt ^RIHtHtHt ^RIHtHtHtHtHtHtHtHtHtHtH t  ^R	I!H"t" ^R
I#H$t$H%t%H&t&H't' ^RI(H)t)H*t*H+t+H,t, ^RI-H.t. ^RI/H0t0 ^RI1H2t2H3t3 ^RI4H5t5H6t6 ^RI7H8t8H9t9H:t:H;t;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtD ^RIEHFtFHGtG ^RIHHItIHJtJ ]P                  '       d   ^ RILtL^RIMHNtNHOtO . R,OtP]P                  ! RRR7      tR]P                  ! RRR7      tSR R ltT ! R R4      tU]U! 4       tV]P                  ! R4      tXR] 2tYRP                  ]"P                  ! 4        U u. uF  q R 8w  g   K  V NK  	  up 4      t\ ! R! R"]P                  4      t^ ! R# R$]C4      t_ ! R% R&]84      t`]P                  R']P                  3,          tc ! R( R)4      td ! R* R]d4      te ! R+ R]d4      tfR# u up i )-    )annotationsN)AsyncGenerator	Generator)asynccontextmanagercontextmanager)TracebackType)__version__)Auth	BasicAuthFunctionAuth)'DEFAULT_KEEPALIVE_PING_INTERVAL_SECONDS&DEFAULT_KEEPALIVE_PING_TIMEOUT_SECONDSDEFAULT_LIMITSDEFAULT_MAX_EVENT_SIZE_BYTESDEFAULT_MAX_MESSAGE_SIZE_BYTESDEFAULT_MAX_REDIRECTSDEFAULT_QUEUE_SIZEDEFAULT_TIMEOUT_CONFIGLimitsProxyTimeout)SUPPORTED_DECODERS)
InvalidURLRemoteProtocolErrorTooManyRedirectsrequest_context)CookiesHeadersRequestResponse)EventSource)codes)AsyncHTTPTransportHTTPTransport)AsyncBaseTransportBaseTransport)AsyncByteStream	AuthTypes	CertTypesCookieTypesHeaderTypes
ProxyTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesSyncByteStreamTimeoutTypes)URLQueryParams)
URLPatternget_environment_proxies)AsyncWebSocketSessionWebSocketSessionAsyncClientClientT)boundUc               $    V ^8  d   QhRRRRRR/# )   urlr4   locationreturnbool )formats   "w/home/vela/workspace/domain/tn-silver/web/tn-site/.runtime/imagegen-venv/lib/python3.14/site-packages/httpx2/_client.py__annotate__rH   G   s!      C 3 4     c                   V P                   pVP                   pVP                  VP                  8H  ;'       dU    VP                  R8H  ;'       d>    VP                  ^P8H  ;'       d'    VP                  R8H  ;'       d    VP                  R8H  # )z9
Return 'True' if 'location' is a HTTPS upgrade of 'url'
httphttpsi  )originhostschemeport)rA   rB   rM   location_origins   &&  rG   _is_https_redirectrR   G   s     ZZFooO 	+++ 	( 	(MMV#	( 	(KK2	( 	( ""g-	( 	(   C'rI   c                      ] tR t^WtRtRtR# )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.
rE   N)__name__
__module____qualname____firstlineno____doc____static_attributes__rE   rI   rG   rT   rT   W   s    rI   rT   httpx2zpython-httpx2/z, identityc                  "    ] tR t^tt^t^t^tRtR# )ClientStaterE   N)rU   rV   rW   rX   UNOPENEDOPENEDCLOSEDrZ   rE   rI   rG   r^   r^   t   s     H F FrI   r^   c                  >    ] tR t^tRtR R ltR R ltR R ltRtR	# )
BoundSyncStreamz
A byte stream that tracks elapsed time for a response. Once closed, the
elapsed time is available via the `elapsed` attribute, and the response
can read it back from `response.stream.elapsed`.
c               $    V ^8  d   QhRRRRRR/# )r@   streamr2   startfloatrC   NonerE   )rF   s   "rG   rH   BoundSyncStream.__annotate__   s!     7 7~ 7e 7 7rI   c                	,    Wn         W n        R V n        R # N_stream_startelapsedselfre   rf   s   &&&rG   __init__BoundSyncStream.__init__       26rI   c                   V ^8  d   QhRR/# )r@   rC   ztyping.Iterator[bytes]rE   )rF   s   "rG   rH   ri      s        0  rI   c              #  	:   "   V P                    R j  xL
  R #  L5irk   )rm   rq   s   &rG   __iter__BoundSyncStream.__iter__   s     <<s   c                   V ^8  d   QhRR/# r@   rC   rh   rE   )rF   s   "rG   rH   ri      s      t rI   c                	    \         P                  ! \        P                  ! 4       V P                  ,
          R 7      V n        V P                  P                  4        R# )secondsN)datetime	timedeltatimeperf_counterrn   ro   rm   closerw   s   &rG   r   BoundSyncStream.close   s6    ))$2C2C2E2STrI   rn   rm   ro   N)	rU   rV   rW   rX   rY   rr   rx   r   rZ   rE   rI   rG   rc   rc      s    7
  rI   rc   c                  >    ] tR t^tRtR R ltR R ltR R ltRtR	# )
BoundAsyncStreamz
An async byte stream that tracks elapsed time for a response. Once closed,
the elapsed time is available via the `elapsed` attribute, and the response
can read it back from `response.stream.elapsed`.
c               $    V ^8  d   QhRRRRRR/# )r@   re   r'   rf   rg   rC   rh   rE   )rF   s   "rG   rH   BoundAsyncStream.__annotate__   s!     7 7 7u 7 7rI   c                	,    Wn         W n        R V n        R # rk   rl   rp   s   &&&rG   rr   BoundAsyncStream.__init__   rt   rI   c                   V ^8  d   QhRR/# )r@   rC   ztyping.AsyncIterator[bytes]rE   )rF   s   "rG   rH   r      s     & &!< &rI   c               	>  "   V P                   P                  4       p V  R j  xL
  pV5x  K   LD \        T\        4      '       d   TP	                  4       G R j  xL 
  R # R #   \        T\        4      '       d   TP	                  4       G R j  xL 
  i i ; i5irk   )rm   	__aiter__
isinstancer   aclose)rq   re   chunks   &  rG   r   BoundAsyncStream.__aiter__   s{     '')	&%  ev &.11mmo%% 2z&.11mmo%% 2sM   BA( 313	A( 3A( )BA!	B(*BBBBc                   V ^8  d   QhRR/# r{   rE   )rF   s   "rG   rH   r      s     $ $d $rI   c                	   "   \         P                  ! \        P                  ! 4       V P                  ,
          R 7      V n        V P                  P                  4       G Rj  xL
  R#  L5ir}   )r   r   r   r   rn   ro   rm   r   rw   s   &rG   r   BoundAsyncStream.aclose   s?     ))$2C2C2E2STll!!###s   AA) A'!A)r   N)	rU   rV   rW   rX   rY   rr   r   r   rZ   rE   rI   rG   r   r      s    7
&$ $rI   r   .c                  ,   ] tR t^tRRRRRRRRR]RRR	]R
RRRRRRR/R R llt]R R l4       t]R R l4       t	R R lt
R R lt]R R l4       t]P                  R R l4       t]R R  l4       t]P                  R! R" l4       t]R# R$ l4       t]P                  R% R& l4       t]R' R( l4       t]P                  R) R* l4       t]R+ R, l4       t]P                  R- R. l4       t]R/ R0 l4       t]P                  R1 R2 l4       t]R3 R4 l4       t]P                  R5 R6 l4       tR7RR8RR9RR:RRRRRRRR]R;R/	R< R= lltR> R? ltRWR@ RA lltRWRB RC lltRWRD RE lltRF RG lt]3RH RI lltRJ RK ltRL RM ltRN RO ltRP RQ ltRR RS lt RT RU lt!RVt"R# )X
BaseClientauthNparamsheaderscookiestimeoutfollow_redirectsFmax_redirectsevent_hooksbase_url 	trust_envTdefault_encodingutf-8c               H    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r@   r   AuthTypes | Noner   QueryParamTypes | Noner   HeaderTypes | Noner   CookieTypes | Noner   r3   r   rD   r   intr   +None | typing.Mapping[str, list[EventHook]]r   	URL | strr   r   *str | typing.Callable[[bytes], str | None]rC   rh   rE   )rF   s   "rG   rH   BaseClient.__annotate__   s      +  +  + '	 +
 $ + $ +  +  +  + C +  +  + E + 
 +rI   c          	     	   Vf   / MTpV P                  \        V	4      4      V n        V P                  V4      V n        \        V4      V n        \        V4      V n        \        V4      V n
        \        V4      V n        W`n        Wpn        R\        VP!                  R. 4      4      R\        VP!                  R. 4      4      /V n        Wn        Wn        \(        P*                  V n        R # )Nrequestresponse)_enforce_trailing_slashr4   	_base_url_build_auth_authr5   _paramsr   r   r   _cookiesr   _timeoutr   r   listget_event_hooks
_trust_env_default_encodingr^   r_   _state)rq   r   r   r   r   r   r   r   r   r   r   r   s   &$$$$$$$$$$$rG   rr   BaseClient.__init__   s     (/b[55c(mD%%d+
"6*w'(( 0*tKOOIr:;[__Z<=
 $!1!**rI   c                   V ^8  d   QhRR/# r@   rC   rD   rE   )rF   s   "rG   rH   r      s     1 14 1rI   c                <    V P                   \        P                  8H  # )z"
Check if the client being closed
)r   r^   ra   rw   s   &rG   	is_closedBaseClient.is_closed   s    
 {{k0000rI   c                   V ^8  d   QhRR/# r   rE   )rF   s   "rG   rH   r      s      4 rI   c                	    V P                   # rk   )r   rw   s   &rG   r   BaseClient.trust_env   s    rI   c                    V ^8  d   QhRRRR/# )r@   rA   r4   rC   rE   )rF   s   "rG   rH   r      s     ; ;3 ;3 ;rI   c                	    VP                   P                  R 4      '       d   V# VP                  VP                   R ,           R7      # )   /raw_path)r   endswith	copy_withrq   rA   s   &&rG   r   "BaseClient._enforce_trailing_slash   s6    <<  &&J}}cllT&9}::rI   c               $    V ^8  d   QhRRRRRR/# )r@   proxyProxyTypes | Noneallow_env_proxiesrD   rC   zdict[str, Proxy | None]rE   )rF   s   "rG   rH   r      s#     % %$5 %$ %Sj %rI   c           	     	    VfG   V'       d=   \        4       P                  4        UUu/ uF  w  r4Y4f   R M\        VR7      bK  	  upp# / # \        V\        \
        34      '       d   \        VR7      MTpRV/# u uppi )N)rA   zall://)r7   itemsr   r   strr4   )rq   r   r   keyrA   s   &&&  rG   _get_proxy_mapBaseClient._get_proxy_map   sn    = UlUnUtUtUvwUv[TenDUvwwI(253*(E(EEe$5Ee$$	 xs   A9c                   V ^8  d   QhRR/# )r@   rC   r   rE   )rF   s   "rG   rH   r      s       rI   c                	    V P                   # rk   )r   rw   s   &rG   r   BaseClient.timeout   s    }}rI   c                    V ^8  d   QhRRRR/# )r@   r   r3   rC   rh   rE   )rF   s   "rG   rH   r      s     ) )| ) )rI   c                	&    \        V4      V n        R # rk   )r   r   )rq   r   s   &&rG   r   r          (rI   c                   V ^8  d   QhRR/# )r@   rC   dict[str, list[EventHook]]rE   )rF   s   "rG   rH   r      s     ! !7 !rI   c                	    V P                   # rk   )r   rw   s   &rG   r   BaseClient.event_hooks   s       rI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   rh   rE   )rF   s   "rG   rH   r      s     
 
'A 
d 
rI   c           	     	    R \        VP                  R . 4      4      R\        VP                  R. 4      4      /V n        R# )r   r   N)r   r   r   )rq   r   s   &&rG   r   r      s8     tKOOIr:;[__Z<=
rI   c                   V ^8  d   QhRR/# )r@   rC   Auth | NonerE   )rF   s   "rG   rH   r     s      k rI   c                    V P                   # )z
Authentication class used when none is passed at the request-level.

See also [Authentication][0].

[0]: /quickstart/#authentication
)r   rw   s   &rG   r   BaseClient.auth  s     zzrI   c                    V ^8  d   QhRRRR/# )r@   r   r(   rC   rh   rE   )rF   s   "rG   rH   r     s     , , ,t ,rI   c                	2    V P                  V4      V n        R # rk   )r   r   rq   r   s   &&rG   r   r     s    %%d+
rI   c                   V ^8  d   QhRR/# )r@   rC   r4   rE   )rF   s   "rG   rH   r     s      # rI   c                    V P                   # )z;
Base URL to use when sending requests with relative URLs.
)r   rw   s   &rG   r   BaseClient.base_url  s    
 ~~rI   c                    V ^8  d   QhRRRR/# )r@   rA   r   rC   rh   rE   )rF   s   "rG   rH   r     s     @ @I @$ @rI   c                	D    V P                  \        V4      4      V n        R # rk   )r   r4   r   r   s   &&rG   r   r     s    55c#h?rI   c                   V ^8  d   QhRR/# )r@   rC   r   rE   )rF   s   "rG   rH   r            rI   c                    V P                   # )z0
HTTP headers to include when sending requests.
)_headersrw   s   &rG   r   BaseClient.headers      
 }}rI   c                    V ^8  d   QhRRRR/# )r@   r   r+   rC   rh   rE   )rF   s   "rG   rH   r   $  s     
' 
'{ 
't 
'rI   c                	    \        R RR\        P                  R4      RRR\        P                  R4      /4      pVP	                  V4       W n        R# )s   Accepts   */*s   Accept-Encodingasciis
   Connections
   keep-alives
   User-AgentN)r   ACCEPT_ENCODINGencode
USER_AGENTupdater   )rq   r   client_headerss   && rG   r   r   #  sP     6"O$:$:7$C}z009	
 	g&&rI   c                   V ^8  d   QhRR/# )r@   rC   r   rE   )rF   s   "rG   rH   r   1  r   rI   c                    V P                   # )z1
Cookie values to include when sending requests.
)r   rw   s   &rG   r   BaseClient.cookies0  r   rI   c                    V ^8  d   QhRRRR/# )r@   r   r*   rC   rh   rE   )rF   s   "rG   rH   r   8  s     ) ){ )t )rI   c                	&    \        V4      V n        R # rk   )r   r   )rq   r   s   &&rG   r   r  7  r   rI   c                   V ^8  d   QhRR/# )r@   rC   r5   rE   )rF   s   "rG   rH   r   <  s       rI   c                    V P                   # )z?
Query parameters to include in the URL when sending requests.
)r   rw   s   &rG   r   BaseClient.params;  s    
 ||rI   c                    V ^8  d   QhRRRR/# )r@   r   r-   rC   rh   rE   )rF   s   "rG   rH   r   C  s     + +_ + +rI   c                	&    \        V4      V n        R # rk   )r5   r   )rq   r   s   &&rG   r   r  B  s    "6*rI   contentdatafilesjson
extensionsc               H    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r@   methodr   rA   r   r  RequestContent | Noner  RequestData | Noner  RequestFiles | Noner  typing.Any | Noner   r   r   r   r   r   r   TimeoutTypes | UseClientDefaultr  RequestExtensions | NonerC   r   rE   )rF   s   "rG   rH   r   F  s     -
 -
-
 -

 '-
 !-
 #-
  -
 '-
 $-
 $-
 1-
 --
 
-
rI   c       	        f   V P                  V4      pV P                  V4      pV P                  V	4      p	V P                  V4      pVf   / MTpRV9  dK   \	        V
\
        4      '       d   V P                  M
\        V
4      p
\        R/ VBRV
P                  4       /B p\        VVVVVVVVV	VR7
      # )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/clients/#request-instances
r   )r  r  r  r  r   r   r   r  rE   )
_merge_url_merge_headers_merge_cookies_merge_queryparamsr   rT   r   r   dictas_dictr   )rq   r  rA   r  r  r  r  r   r   r   r   r  s   &&&$$$$$$$$$rG   build_requestBaseClient.build_requestF  s    4 ooc"%%g.%%g.((0%-R:
J&&0:J&K&KdllQXY`QaGF
FGOO4EFJ!
 	
rI   c                    V ^8  d   QhRRRR/# )r@   rA   r   rC   r4   rE   )rF   s   "rG   rH   r   u  s      i C rI   c                    \        V4      pVP                  '       dS   V P                  P                  VP                  P	                  R4      ,           pV P                  P                  VR7      # V# )zs
Merge a URL argument together with any 'base_url' on the client,
to create the URL used for the outgoing request.
r   r   )r4   is_relative_urlr   r   lstripr   )rq   rA   	merge_urlmerge_raw_paths   &&  rG   r  BaseClient._merge_urlu  s_    
 H	$$$ "]]33i6H6H6O6OPT6UUN==**N*CCrI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   rE   )rF   s   "rG   rH   r     s     	 	&8 	DV 	rI   c                    V'       g   V P                   '       d)   \        V P                   4      pVP                  V4       V# V# )zx
Merge a cookies argument together with any cookies on the client,
to create the cookies used for the outgoing request.
)r   r   r   )rq   r   merged_cookiess   && rG   r  BaseClient._merge_cookies  s6    
 dlll$T\\2N!!'*!!rI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   rE   )rF   s   "rG   rH   r     s      &8 DV rI   c                R    \        V P                  4      pVP                  V4       V# )zx
Merge a headers argument together with any headers on the client,
to create the headers used for the outgoing request.
)r   r   r   )rq   r   merged_headerss   && rG   r  BaseClient._merge_headers  s&    
 !.g&rI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   rE   )rF   s   "rG   rH   r     s      )? Ka rI   c                    V'       g   V P                   '       d'   \        V P                   4      pVP                  V4      # V# )z
Merge a queryparams argument together with any queryparams on the client,
to create the queryparams used for the outgoing request.
)r   r5   merge)rq   r   merged_queryparamss   && rG   r  BaseClient._merge_queryparams  s4    
 T[[[!,T[[!9%++F33rI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   r   rE   )rF   s   "rG   rH   r     s     
B 
B 0 
B[ 
BrI   c                	    Vf   R # \        V\        4      '       d   \        V^ ,          V^,          R7      # \        V\        4      '       d   V# \	        V4      '       d   \        VR7      # \        RV: 24      h)Nusernamepassword)funczInvalid "auth" argument: )r   tupler   r
   callabler   	TypeErrorr   s   &&rG   r   BaseClient._build_auth  se    <e$$d1gQ@@d##Kd^^T**7x@AArI   c               $    V ^8  d   QhRRRRRR/# )r@   r   r   r   #AuthTypes | UseClientDefault | NonerC   r
   rE   )rF   s   "rG   rH   r     s(       2 
	rI   c                	   \        V\        4      '       d   V P                  MV P                  V4      pVe   V# VP                  P
                  VP                  P                  rCV'       g	   V'       d   \        W4R7      # \        4       # )Nr7  )	r   rT   r   r   rA   r8  r9  r   r
   )rq   r   r   r8  r9  s   &&&  rG   _build_request_authBaseClient._build_request_auth  se    
 (.>??tzzTEUEUVZE[K$[[117;;3G3G(xhBBvrI   c               $    V ^8  d   QhRRRRRR/# )r@   r   r   r   r    rC   rE   )rF   s   "rG   rH   r     s!     
 
w 
( 
w 
rI   c           	         V P                  W4      pV P                  W4      pV P                  WV4      pV P                  W4      p\	        V P
                  4      p\        VVVVVVP                  R7      # )zk
Given a request and a redirect response, return a new request that
should be used to effect the redirect.
)r  rA   r   r   re   r  )_redirect_method_redirect_url_redirect_headers_redirect_streamr   r   r   r  )rq   r   r   r  rA   r   re   r   s   &&&     rG   _build_redirect_request"BaseClient._build_redirect_request  sy    
 &&w9  3((v>&&w7$,,'))
 	
rI   c               $    V ^8  d   QhRRRRRR/# )r@   r   r   r   r    rC   r   rE   )rF   s   "rG   rH   r     s!       8  rI   c                   VP                   pVP                  \        P                  8X  d
   VR8w  d   RpVP                  \        P                  8X  d
   VR9  d   RpVP                  \        P
                  8X  d
   VR8X  d   RpV# )zs
When being redirected we may want to change the method of the request
based on certain specs or browser behavior.
HEADGETPOST)rN  QUERY)r  status_coder"   	SEE_OTHERFOUNDMOVED_PERMANENTLY)rq   r   r   r  s   &&& rG   rF  BaseClient._redirect_method  su    
  5??2v7GF 5;;.6AR3RF 5#:#::v?OFrI   c               $    V ^8  d   QhRRRRRR/# )r@   r   r   r   r    rC   r4   rE   )rF   s   "rG   rH   r     s!      W  S rI   c                $   VP                   R,          p \        V4      pTP                  '       d9   TP
                  '       g'   TP                  TP                  P
                  R7      pTP                  '       d   TP                  P                  T4      pTP                  P                  '       d9   TP                  '       g'   TP                  TP                  P                  R7      pT#   \         d   p\        RT R2TR7      RhRp?ii ; i)z,
Return the URL for the redirect to follow.
Locationz Invalid URL in location header: .r   N)rN   )fragment)r   r4   r   r   rO   rN   r   rA   r#  joinr\  )rq   r   r   rB   rA   excs   &&&   rG   rG  BaseClient._redirect_url  s     ##J/	lh-C :::chhh--W[[%5%5-6C ++""3'C ;;--)=)=->C
#  	l%(HQ&OY`agkk	ls   C- -D8D

Dc               (    V ^8  d   QhRRRRRRRR/# )	r@   r   r   rA   r4   r  r   rC   r   rE   )rF   s   "rG   rH   r     s(       s C G rI   c                   \        VP                  4      pVP                  VP                  P                  8w  dM   \	        VP                  V4      '       g   VP                  RR4       VP                  P                  R4      VR&   W1P                  8w  d,   VR8X  d%   VP                  RR4       VP                  RR4       VP                  RR4       V# )	zB
Return the headers that should be used for the redirect request.
AuthorizationNr   HostrO  zContent-LengthzTransfer-EncodingCookie)	r   r   rM   rA   rR   popnetlocdecoder  )rq   r   rA   r  r   s   &&&& rG   rH  BaseClient._redirect_headers  s     '//*::+++%gkk377 OT2 "jj//8GFO^^#% KK($/KK+T2 	Hd#rI   c               $    V ^8  d   QhRRRRRR/# )r@   r   r   r  r   rC   z'SyncByteStream | AsyncByteStream | NonerE   )rF   s   "rG   rH   r   '  s"        Ah rI   c                L    W!P                   8w  d
   VR8X  d   R# VP                  # )z?
Return the body that should be used for the redirect request.
rO  N)r  re   )rq   r   r  s   &&&rG   rI  BaseClient._redirect_stream'  s!     ^^#%~~rI   c                    V ^8  d   QhRRRR/# )r@   r   r   rC   rh   rE   )rF   s   "rG   rH   r   0  s     W WG W WrI   c                	   R VP                   9  dp   \        V P                  \        4      '       d   V P                  M\	        V P                  4      p\        R/ VP                   BR VP                  4       /B Vn         R# R# )r   NrE   )r  r   r   rT   r   r  r  )rq   r   r   s   && rG   _set_timeoutBaseClient._set_timeout0  s`    G...&0?O&P&PdllV]^b^j^jVkG!%!V(:(:!VGOODU!VG /rI   )r   r   r   r   r   r   r   r   r   r   r   r   r   rk   )#rU   rV   rW   rX   r   r   rr   propertyr   r   r   r   r   setterr   r   r   r   r   r   USE_CLIENT_DEFAULTr  r  r  r  r  r   rB  rJ  rF  rG  rH  rI  rn  rZ   rE   rI   rG   r   r      s    + "& + *.	 +
 '+ + '+ + !7 + "' + 3 + FJ + ! +  + HO +D 1 1  ;
%   ^^) ) ! ! 
 
   
[[, ,   __@ @   ^^
' 
'   ^^) )   ]]+ +-

 *.-
 $(-
 &*-
 #'-
 *.-
 '+-
 '+-
 4F-
 04-
^,	
B 5G 
&266W WrI   r   c            &        a  ] tR tRtRtRRRRRRRRRR	R
RRR	RR	RRRRRRR]RRR]R]RRRRRRRR/R V 3R llltR	RR	R	R]R3R R llt	R	RR	R	R]3R R  llt
R! R" ltR#RR$RR%RR&RRRRRRRR]R]R]R'R/R( R) llt]R#RR$RR%RR&RRRRRRRR]R]R]R'R/R* R+ ll4       t]R,R-R#RR$RR%RR&RRRRRRRR]R]R]R'RR.]/R/ R0 ll4       t]R1]R2]R3]R4]R5RRRRRRRR]R]R]R'R/R6 R7 ll4       tR8RR]R]/R9 R: lltR; R< ltR= R> ltR? R@ ltRRRRRRR]R]R]R'R/RA RB lltRRRRRRR]R]R]R'R/RC RD lltRRRRRRR]R]R]R'R/RE RF lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RG RH lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RI RJ lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RK RL llt RRRRRRR]R]R]R'R/RM RN llt!R#RR$RR%RR&RRRRRRRR]R]R]R'R/RO RP llt"RQ RR lt#RS RT lt$RXRU RV llt%RWt&V ;t'# )Yr;   i6  au  
An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc.

It can be shared between threads.

Usage:

```python
>>> client = httpx2.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)* Either `True` to use an SSL context with the
default CA bundle, `False` to disable verification, or an instance of
`ssl.SSLContext` to use a custom context.
* **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.
* **mounts** - *(optional)* A dictionary mapping URL patterns to transports,
used to route requests through specific transports based on the URL.
* **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.
* **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".
r   Nr   r   r   verifyTcertr   http1http2Fr   mountsr   r   limitsr   r   r   r   	transportr   r   c          (     h    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRRRRR R!R"R#R$R%/# )&r@   r   r   r   r   r   r   r   r   rt  ssl.SSLContext | str | boolru  CertTypes | Noner   rD   rv  rw  r   r   rx  z0None | typing.Mapping[str, BaseTransport | None]r   r3   r   ry  r   r   r   r   r   r   r   rz  BaseTransport | Noner   r   rC   rh   rE   )rF   s   "rG   rH   Client.__annotate__e  s     K: K: K: '	K:
 $K: $K: ,K: K: K: K: K: !K: CK: K: K:  !K:" #K:$ C%K:& 'K:( ()K:* E+K:, 
-K:rI   c               	  < \         SV `  VVVVVVVVVVVR 7       V	'       d    ^ RIpT;'       d    VRJ pV P	                  V
V4      pV P                  VVVVV	VVR7      V n        VP                  4        UU
u/ uF.  w  pp
\        V4      V
f   RMV P                  V
VVVVV	VR7      bK0  	  up
pV n
        VeI   V P                  P                  VP                  4        UUu/ uF  w  pp\        V4      VbK  	  upp4       \        \        V P                  P                  4       4      4      V n
        R#   \         d    \        R4      Rhi ; iu up
pi u uppi )r   r   r   r   r   r   r   r   r   r   r   NzuUsing http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.)rt  ru  r   rv  rw  ry  rz  rt  ru  r   rv  rw  ry  superrr   h2ImportErrorr   _init_transport
_transportr   r6   _init_proxy_transport_mountsr   r  sorted)rq   r   r   r   r   rt  ru  r   rv  rw  r   rx  r   r   ry  r   r   r   rz  r   r  r   	proxy_mapr   	__class__s   &$$$$$$$$$$$$$$$$$$$    rG   rr   Client.__init__e  s   . 	-'#- 	 	
  &;;)t*;''/@A	.. / 
* (oo/@
 0
U sO} "++# , 
 0@
 LLRXR^R^R` aR`YC)!;R` abF4<<#5#5#789G  !S $@
 !b   D5 94E"E
5Ec               8    V ^8  d   QhRRRRRRRRRRR	R
RRRR/# )r@   rt  r|  ru  r}  r   rD   rv  rw  ry  r   rz  r~  rC   r&   rE   )rF   s   "rG   rH   r    sZ     
 
+
 
 	

 
 
 
 (
 

rI   c           	     	0    Ve   V# \        VVVVVVR7      # Nr  r$   rq   rt  ru  r   rv  rw  ry  rz  s   &&&&&&&&rG   r  Client._init_transport  s/      
 	
rI   c               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r@   r   r   rt  r|  ru  r}  r   rD   rv  rw  ry  r   rC   r&   rE   )rF   s   "rG   rH   r    sZ     
 

 ,
 	

 
 
 
 
 

rI   c           
     	&    \        VVVVVVVR 7      # )rt  ru  r   rv  rw  ry  r   r  rq   r   rt  ru  r   rv  rw  ry  s   &&&&&&&&rG   r  Client._init_proxy_transport  s&     
 	
rI   c                    V ^8  d   QhRRRR/# )r@   rA   r4   rC   r&   rE   )rF   s   "rG   rH   r    s     	 	c 	m 	rI   c                    V P                   P                  4        F2  w  r#VP                  V4      '       g   K  Vf   V P                  u # Tu # 	  V P                  # 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  rq   rA   patternrz  s   &&  rG   _transport_for_urlClient._transport_for_url  M    
 #',,"4"4"6Gs##*3*;tJJ #7 rI   r  r  r  r  r  c               P    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRR/# r@   r  r   rA   r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   bool | UseClientDefaultr   r  r  r  rC   r    rE   )rF   s   "rG   rH   r    s     6P 6P6P 6P
 '6P !6P #6P  6P '6P $6P $6P 26P 26P 16P -6P  
!6PrI   c                   V	e    Rp\         P                  ! V\        ^R7       V P                  VVVVVVVVV	VVR7      pV P	                  WVR7      # )aQ  
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/clients/#merging-of-configuration
Setting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.
stacklevelr  rA   r  r  r  r  r   r   r   r   r  r   r   warningswarnDeprecationWarningr  sendrq   r  rA   r  r  r  r  r   r   r   r   r   r   r  messager   s   &&&$$$$$$$$$$$  rG   r   Client.request  su    B C 
 MM'#5!D$$! % 
 yy>NyOOrI   c               P    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRR/# )r@   r  r   rA   r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   r  r   r  r  r  rC   zGenerator[Response]rE   )rF   s   "rG   rH   r     s     1 11 1
 '1 !1 #1  1 '1 $1 $1 21 21 11 -1  
!1rI   c             #     "   V P                  VVVVVVVVV	VVR7      pV P                  VV
VRR7      p Vx  VP                  4        R#   TP                  4        i ; i5iz
Alternative to `httpx2.request()` that streams the response body
instead of loading it into memory at once.

**Parameters**: See `httpx2.request`.

See also: [Streaming Responses][0]

[0]: /quickstart#streaming-responses
r  T)r   r   r   re   N)r  r  r   rq   r  rA   r  r  r  r  r   r   r   r   r   r   r  r   r   s   &&&$$$$$$$$$$$  rG   re   Client.stream  s|     8 $$! % 
 99-	  
	NNNHNNs   2A A A AA r  rO  max_event_sizec               T    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRR/# )r@   rA   r   r  r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   r  r   r  r  r  r  
int | NonerC   zGenerator[EventSource]rE   )rF   s   "rG   rH   r  T  s     (G (G(G 	(G
 '(G !(G #(G  (G '(G $(G $(G 2(G 2(G 1(G -(G  #!(G" 
 #(GrI   c             #     "   V P                  VVVVVVVRRRR/\        V4      ,          V	V
VVVR7      ;_uu_ 4       p\        WR7      x  RRR4       R#   + '       g   i     R# ; i5i)
Connect to a server-sent events endpoint and yield an `EventSource`.

Iterating the `EventSource` yields `ServerSentEvent` instances.

**Parameters**: See `httpx2.request`.
Accepttext/event-streamCache-Controlno-storer  r  r  r  r   r   r   r   r   r   r  r  Nre   r   r!   rq   rA   r  r  r  r  r  r   r   r   r   r   r   r  r  r   s   &&$$$$$$$$$$$$$ rG   sse
Client.sseS  s~     4 [[2OZPSZ[bScc-!  
 
 hFF
 
 
 
s   ;A*A
A*A'	!	A*max_message_size_bytes
queue_sizekeepalive_ping_interval_secondskeepalive_ping_timeout_secondssubprotocolsc               P    V ^8  d   QhRRRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# )r@   rA   r   r  r   r  r  float | Noner  r  list[str] | Noner   r   r   r   r   r   r   r@  r   r  r   r  r  r  rC   zGenerator[WebSocketSession]rE   )rF   s   "rG   rH   r    s     4 44 !$	4
 4 *64 )54 '4 '4 $4 $4 24 24 14 -4  
%!4rI   c             #     "    ^RI Hp T! \        T4      T TTTTTTTT	T
TTTR7      ;_uu_ 4       pTx  RRR4       R#   \         d    \        R4      hi ; i  + '       g   i     R# ; i5i)a2  
Open a WebSocket session, using this client's configuration.

The session is closed automatically when exiting the context manager.

```python
with httpx2.Client() as client:
    with client.websocket("ws://localhost:8000/ws") as ws:
        ws.send_text("Hello!")
        message = ws.receive_text()
```
)
connect_ws[WebSocket support requires the `wsproto` package. Install it with `pip install httpx2[ws]`.r  r  r  r  r  r   r   r   r   r   r   r  N)websockets._apir  r  r   )rq   rA   r  r  r  r  r  r   r   r   r   r   r   r  r  sessions   &&$$$$$$$$$$$$  rG   	websocketClient.websocket~  s     <	3 H#9!,K+I%-!
 
 M!
 
  	m 	

 
 
s1   A.A  'A.A
A. AA.A+	%	A.re   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r@   r   r   re   rD   r   r@  r   r  rC   r    rE   )rF   s   "rG   rH   r    <     - -- 	-
 2- 2- 
-rI   c                  V P                   \        P                  8X  d   \        R4      h\        P                  V n         \        V\        4      '       d   V P                  MTpV P                  V4       V P                  W4      pV P                  VVV. R7      p V'       g   VP                  4        V#   \         d   pTP                  4        ThRp?ii ; i)aL  
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 `httpx2.Request()` is supported as well.

See also: [Request instances][0]

[0]: /advanced/clients/#request-instances
5Cannot send a request, as the client has been closed.r   r   historyN)r   r^   ra   RuntimeErrorr`   r   rT   r   rn  rB  _send_handling_authreadBaseExceptionr   rq   r   re   r   r   r   r^  s   &&$$$  rG   r  Client.send  s    * ;;+,,,VWW!((4>?OQa4b4b400hx'"''6++-	 , 
	O 	NNI	s   B6 6CCCc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r@   r   r   r   r
   r   rD   r  list[Response]rC   r    rE   )rF   s   "rG   rH   r    s<            	 
    
 rI   c                	   VP                  V4      p \        V4      p V P                  VVVR7      p  VP                  V4      p\        T4      Tn        TP                  4        TpTP                  T4       K]    \         d    Tu TP                  4        # i ; i  \         d   pTP                  4        ThRp?ii ; i  TP                  4        i ; i)Tr   r  N)sync_auth_flownext_send_handling_redirectsr  StopIterationr   r   r  r  appendr  	rq   r   r   r   r  	auth_flowr   next_requestr^  s	   &&&&&    rG   r  Client._send_handling_auth  s     ''0		9oG88%5# 9 
('0~~h'? (,G}H$MMO*GNN8, ) (' OO( % NN$I OOsL    C A; 3B 9C ;BB BB C )B;;C  C Cc               (    V ^8  d   QhRRRRRRRR/# 	r@   r   r   r   rD   r  r  rC   r    rE   )rF   s   "rG   rH   r    s2     ! !! !  	!
 
!rI   c                	    \        V4      V P                  8  d   \        RVR7      hV P                  R,           F  pV! V4       K  	  V P	                  V4      p V P                  R,           F  pV! V4       K  	  \        V4      Vn        VP                  '       g   V# V P                  W4      pW5.,           pV'       d   VP                  4        K  Wn
        V#   \         d   pTP                  4        ThRp?ii ; i)T#Exceeded maximum allowed redirects.r[  r   r   N)lenr   r   r   _send_single_requestr   r  has_redirect_locationrJ  r  r  r  r   rq   r   r   r  hookr   r^  s   &&&&   rG   r  Client._send_handling_redirects  s     7|d000&'LV]^^)))44W 5 009H --j99DN :#'= 555#O66wI!J.#MMO,3)#O   	s%   AC #2C C D*C<<Dc                    V ^8  d   QhRRRR/# r@   r   r   rC   r    rE   )rF   s   "rG   rH   r  )  s      G  rI   c                   V P                  VP                  4      p\        P                  ! 4       p\	        VP
                  \        4      '       g   \        R4      h\        VR7      ;_uu_ 4        VP                  V4      pRRR4       \	        XP
                  \        4      '       g   Q hWn
        \        VP
                  VR7      Vn        V P                  P                  V4       V P                  Vn        \         P#                  RVP$                  VP                  VP&                  VP(                  VP*                  4       V#   + '       g   i     L; i)<
Sends a single request, without handling any redirections.
z?Attempted to send an async request with a sync Client instance.r[  Nrf   HTTP Request: %s %s "%s %d %s")r  rA   r   r   r   re   r2   r  r   handle_requestr   rc   r   extract_cookiesr   r   loggerinfor  http_versionrR  reason_phraserq   r   rz  rf   r   s   &&   rG   r  Client._send_single_request)  s     ++GKK8	!!#'...99`aaW-- //8H . (//>::::")(//G$$X.$($:$:!,NNKK!!  ""	
 ' .-s   0EE	c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r@   rA   r   r   r   r   r   r   r   r   r@  r   r  r   r  r  r  rC   r    rE   )rF   s   "rG   rH   r  H  d     
 

 '	

 $
 $
 2
 2
 1
 -
 

rI   c               6    V P                  RVVVVVVVVR7	      # )>
Send a `GET` request.

**Parameters**: See `httpx2.request`.
rO  r   r   r   r   r   r   r  r[  	rq   rA   r   r   r   r   r   r   r  s	   &&$$$$$$$rG   r   
Client.getH  s5    " ||-!  

 
	
rI   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r@   rA   r   r   r   r   r   r   r   r   AuthTypes | UseClientDefaultr   r  r   r  r  r  rC   r    rE   )rF   s   "rG   rH   r  e  d     
 

 '	

 $
 $
 +
 2
 1
 -
 

rI   c               6    V P                  RVVVVVVVVR7	      # )C
Send an `OPTIONS` request.

**Parameters**: See `httpx2.request`.
OPTIONSr  r[  r  s	   &&$$$$$$$rG   optionsClient.optionse  s5    " ||-!  

 
	
rI   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r    r  rI   c               6    V P                  RVVVVVVVVR7	      # )?
Send a `HEAD` request.

**Parameters**: See `httpx2.request`.
rN  r  r[  r  s	   &&$$$$$$$rG   headClient.head  s5    " ||-!  

 
	
rI   c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r@   rA   r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r  r   r  r   r  r  r  rC   r    rE   )rF   s   "rG   rH   r         #
 #
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
rI   c               >    V P                  RVVVVVVVVV	V
VVR7      # )?
Send a `POST` request.

**Parameters**: See `httpx2.request`.
rP  r  r[  rq   rA   r  r  r  r  r   r   r   r   r   r   r  s   &&$$$$$$$$$$$rG   postClient.post  sA    * ||-!  
 	
rI   c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r    r%  rI   c               >    V P                  RVVVVVVVVV	V
VVR7      # )>
Send a `PUT` request.

**Parameters**: See `httpx2.request`.
PUTr  r[  r(  s   &&$$$$$$$$$$$rG   put
Client.put  sA    * ||-!  
 	
rI   c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r    r%  rI   c               >    V P                  RVVVVVVVVV	V
VVR7      # )@
Send a `PATCH` request.

**Parameters**: See `httpx2.request`.
PATCHr  r[  r(  s   &&$$$$$$$$$$$rG   patchClient.patch  A    * ||-!  
 	
rI   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r    r  rI   c               6    V P                  RVVVVVVVVR7	      # )A
Send a `DELETE` request.

**Parameters**: See `httpx2.request`.
DELETEr  r[  r  s	   &&$$$$$$$rG   deleteClient.delete  s5    " ||-!  

 
	
rI   c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r  +  r%  rI   c               >    V P                  RVVVVVVVVV	V
VVR7      # )@
Send a `QUERY` request.

**Parameters**: See `httpx2.request`.
rQ  r  r[  r(  s   &&$$$$$$$$$$$rG   queryClient.query+  r7  rI   c                   V ^8  d   QhRR/# r{   rE   )rF   s   "rG   rH   r  P  s     
& 
&t 
&rI   c                   V P                   \        P                  8w  di   \        P                  V n         V P                  P	                  4        V P
                  P                  4        F  pVf   K	  VP	                  4        K  	  R# R# z
Close transport and proxies.
N)r   r^   ra   r  r   r  values)rq   rz  s   & rG   r   Client.closeP  s_     ;;+,,,%,,DKOO!!#!\\002	(OO% 3	 -rI   c                    V ^8  d   QhRRRR/# )r@   rq   r<   rC   rE   )rF   s   "rG   rH   r  \  s       a rI   c                	   V P                   \        P                  8w  d?   \        P                  R \        P                  R/V P                   ,          p\        V4      h\        P                  V n         V P                  P                  4        V P                  P                  4        F  pVf   K	  VP                  4        K  	  V # )-Cannot open a client instance more than once.9Cannot reopen a client instance, once it has been closed.)
r   r^   r_   r`   ra   r  r  	__enter__r  rF  )rq   msgrz  s   &  rG   rL  Client.__enter__\  s    ;;+...""$S""%` kkC s##!((!!#,,.I$##% / rI   c               (    V ^8  d   QhRRRRRRRR/# 	r@   exc_typeztype[BaseException] | None	exc_valuezBaseException | None	tracebackzTracebackType | NonerC   rh   rE   )rF   s   "rG   rH   r  l  s8     C C,C (C (	C
 
CrI   c                	    \         P                  V n        V P                  P	                  WV4       V P
                  P                  4        F  pVf   K	  VP	                  WV4       K  	  R # rk   )r^   ra   r   r  __exit__r  rF  )rq   rQ  rR  rS  rz  s   &&&& rG   rU  Client.__exit__l  sR     "((  i@,,.I$""8	B /rI   r  r   r  NNN)(rU   rV   rW   rX   rY   r   r   r   rr   r  r  r  rr  r   r   re   r   r  r   r   r   r   r  r  r  r  r  r   r  r!  r)  r/  r5  r<  rA  r   rL  rU  rZ   __classcell__r  s   @rG   r;   r;   6  s   ,\K: "&K: *.	K:
 '+K: '+K: /3K: "&K: K: K: K: $(K: FJK: !7K: "'K:  (!K:" 3#K:$ FJ%K:& !'K:( +/)K:* HO+K: K:^ /3!%'*.
2 /3!%'
(	6P
 *.6P $(6P &*6P #'6P *.6P '+6P '+6P 5G6P 5G6P 4F6P 046Pp 1
 *.1 $(1 &*1 #'1 *.1 '+1 '+1 5G1 5G1 4F1 041 1f (G 	(G
 *.(G $((G &*(G #'(G *.(G '+(G '+(G 5G(G 5G(G 4F(G 04(G  &B!(G (GT 4 'E	4
 -4 9`4 8^4 *.4 *.4 '+4 '+4 5G4 5G4 4F4 044 4l- 	-
 5G- 5G-^ D!F>
 *.	

 '+
 '+
 5G
 5G
 4F
 04
:
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J
& C CrI   c            &        a  ] tR tRtRtRRRRRRRRRR	R
RRR	RRRRRRR]RRR]R]RRRRRRRR	RR/R V 3R llltR	RR	R	R]R3R R llt	R	RR	R	R]3R R  llt
R! R" ltR#RR$RR%RR&RRRRRRRR]R]R]R'R/R( R) llt]R#RR$RR%RR&RRRRRRRR]R]R]R'R/R* R+ ll4       t]R,R-R#RR$RR%RR&RRRRRRRR]R]R]R'RR.]/R/ R0 ll4       t]R1]R2]R3]R4]R5RRRRRRRR]R]R]R'R/R6 R7 ll4       tR8RR]R]/R9 R: lltR; R< ltR= R> ltR? R@ ltRRRRRRR]R]R]R'R/RA RB lltRRRRRRR]R]R]R'R/RC RD lltRRRRRRR]R]R]R'R/RE RF lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RG RH lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RI RJ lltR#RR$RR%RR&RRRRRRRR]R]R]R'R/RK RL llt RRRRRRR]R]R]R'R/RM RN llt!R#RR$RR%RR&RRRRRRRR]R]R]R'R/RO RP llt"RQ RR lt#RS RT lt$RXRU RV llt%RWt&V ;t'# )Yr:   iz  a  
An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
cookie persistence, etc.

It can be shared between tasks.

Usage:

```python
>>> async with httpx2.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)* Either `True` to use an SSL context with the
default CA bundle, `False` to disable verification, or an instance of
`ssl.SSLContext` to use a custom context.
* **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.
* **mounts** - *(optional)* A dictionary mapping URL patterns to transports,
used to route requests through specific transports based on the URL.
* **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.
* **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".
r   Nr   r   r   rt  Tru  rv  rw  Fr   rx  r   r   ry  r   r   r   r   rz  r   r   r   c          (     h    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRRRR R!RR"R#R$R%/# )&r@   r   r   r   r   r   r   r   r   rt  r|  ru  r}  rv  rD   rw  r   r   rx  z5None | typing.Mapping[str, AsyncBaseTransport | None]r   r3   r   ry  r   r   r   r   r   r   r   rz  AsyncBaseTransport | Noner   r   r   rC   rh   rE   )rF   s   "rG   rH   AsyncClient.__annotate__  s     K: K: K: '	K:
 $K: $K: ,K: K: K: K: !K: HK: K: K: K:  !K:" C#K:$ %K:& -'K:( )K:* E+K:, 
-K:rI   c               	  < \         SV `  VVVVVVVVVVVR 7       V'       d    ^ RIpT;'       d    VRJ pV P	                  V	V4      pV P                  VVVVVVVR7      V n        VP                  4        UU	u/ uF.  w  pp	\        V4      V	f   RMV P                  V	VVVVVVR7      bK0  	  up	pV n
        V
eI   V P                  P                  V
P                  4        UUu/ uF  w  pp\        V4      VbK  	  upp4       \        \        V P                  P                  4       4      4      V n
        R#   \         d    \        R4      Rhi ; iu up	pi u uppi r  r  )rq   r   r   r   r   rt  ru  rv  rw  r   rx  r   r   ry  r   r   r   rz  r   r   r  r   r  r   r  s   &$$$$$$$$$$$$$$$$$$$    rG   rr   AsyncClient.__init__  s   . 	-'#- 	 	
  &;;)t*;''/@A	.. / 
, (oo/E
 0
U sO} "++# , 
 0E
 LLRXR^R^R` aR`YC)!;R` abF4<<#5#5#789G  !S &E
 !br  c               8    V ^8  d   QhRRRRRRRRRRR	R
RRRR/# )r@   rt  r|  ru  r}  r   rD   rv  rw  ry  r   rz  r]  rC   r%   rE   )rF   s   "rG   rH   r^    sZ     
 
+
 
 	

 
 
 
 -
 

rI   c           	     	0    Ve   V# \        VVVVVVR7      # r  r#   r  s   &&&&&&&&rG   r  AsyncClient._init_transport  s/      !
 	
rI   c               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r@   r   r   rt  r|  ru  r}  r   rD   rv  rw  ry  r   rC   r%   rE   )rF   s   "rG   rH   r^    sZ     
 

 ,
 	

 
 
 
 
 

rI   c           
     	&    \        VVVVVVVR 7      # r  rc  r  s   &&&&&&&&rG   r  !AsyncClient._init_proxy_transport  s&     "
 	
rI   c                    V ^8  d   QhRRRR/# )r@   rA   r4   rC   r%   rE   )rF   s   "rG   rH   r^  !  s     	 	c 	.@ 	rI   c                    V P                   P                  4        F2  w  r#VP                  V4      '       g   K  Vf   V P                  u # Tu # 	  V P                  # r  r  r  s   &&  rG   r  AsyncClient._transport_for_url!  r  rI   r  r  r  r  r  c               P    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRR/# r  rE   )rF   s   "rG   rH   r^  ,  s     7V 7V7V 7V
 '7V !7V #7V  7V '7V $7V $7V 27V 27V 17V -7V  
!7VrI   c                  "   V	e    Rp\         P                  ! V\        ^R7       V P                  VVVVVVVVV	VVR7      pV P	                  WVR7      G Rj  xL
 #  L5i)aa  
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/clients/#merging-of-configuration
Nr  r  r  r  r  r  s   &&&$$$$$$$$$$$  rG   r   AsyncClient.request,  s~     D C 
 MM'#5!D$$! % 
 YYwDTYUUUUs   AAAAc               P    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRR/# )r@   r  r   rA   r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   r  r   r  r  r  rC   zAsyncGenerator[Response]rE   )rF   s   "rG   rH   r^  f  s     1$ 1$1$ 1$
 '1$ !1$ #1$  1$ '1$ $1$ $1$ 21$ 21$ 11$ -1$  
"!1$rI   c                 "   V P                  VVVVVVVVV	VVR7      pV P                  VV
VRR7      G Rj  xL
 p V5x  VP                  4       G Rj  xL
  R#  L$ L  TP                  4       G Rj  xL 
  i ; i5ir  )r  r  r   r  s   &&&$$$$$$$$$$$  rG   re   AsyncClient.streame  s     8 $$! % 
 -	 # 
 
	$N//###
 $(//###sD   5A>AA>A  A>AA>A> A;4A75A;;A>r  rO  r  c               T    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRR/# )r@   rA   r   r  r   r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   r  r   r  r  r  r  r  rC   zAsyncGenerator[EventSource]rE   )rF   s   "rG   rH   r^    s     (G (G(G 	(G
 '(G !(G #(G  (G '(G $(G $(G 2(G 2(G 1(G -(G  #!(G" 
%#(GrI   c                "   V P                  VVVVVVVRRRR/\        V4      ,          V	V
VVVR7      ;_uu_4       GRj  xL
 p\        WR7      5x  RRR4      GRj  xL
  R#  L% L  + GRj  xL 
 '       g   i     R# ; i5i)r  r  r  r  r  r  Nr  r  r  s   &&$$$$$$$$$$$$$ rG   r  AsyncClient.sse  s     4 ;;2OZPSZ[bScc-!  
 
 
 hFF
 
 
 
 
 
sM   ?BA'BA+B A)!B)B+B	1A42
B	=B	?	Br  r  r  r  r  c               P    V ^8  d   QhRRRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# )r@   rA   r   r  r   r  r  r  r  r  r  r   r   r   r   r   r   r   r@  r   r  r   r  r  r  rC   z%AsyncGenerator[AsyncWebSocketSession]rE   )rF   s   "rG   rH   r^    s     4 44 !$	4
 4 *64 )54 '4 '4 $4 $4 24 24 14 -4  
/!4rI   c                "    ^RI Hp T! \        T4      T TTTTTTTT	T
TTTR7      ;_uu_4       GRj  xL
 pT5x  RRR4      GRj  xL
  R#   \         d    \        R4      hi ; i L5 L"  + GRj  xL 
 '       g   i     R# ; i5i)aO  
Open a WebSocket session, using this client's configuration.

The session is closed automatically when exiting the context manager.

```python
async with httpx2.AsyncClient() as client:
    async with client.websocket("ws://localhost:8000/ws") as ws:
        await ws.send_text("Hello!")
        message = await ws.receive_text()
```
)aconnect_wsr  r  N)r  rv  r  r   )rq   rA   r  r  r  r  r  r   r   r   r   r   r   r  rv  r  s   &&$$$$$$$$$$$$  rG   r  AsyncClient.websocket  s     <	4 H#9!,K+I%-!
 
 
 M!
 
 
  	m 	

 
 
 
s_   BA +BA+BA/B
A-BA((B-B/B		5A86
B		B			Bre   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r  rE   )rF   s   "rG   rH   r^    r  rI   c                 "   V P                   \        P                  8X  d   \        R4      h\        P                  V n         \        V\        4      '       d   V P                  MTpV P                  V4       V P                  W4      pV P                  VVV. R7      G Rj  xL
 p V'       g   VP                  4       G Rj  xL
  V#  L' L  \         d!   pTP                  4       G Rj  xL 
  ThRp?ii ; i5i)aQ  
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 `httpx2.Request()` is supported as well.

See also: [Request instances][0]

[0]: /advanced/clients/#request-instances
r  r  N)r   r^   ra   r  r`   r   rT   r   rn  rB  r  areadr  r   r  s   &&$$$  rG   r  AsyncClient.send  s     * ;;+,,,VWW!((4>?OQa4b4b400hx'"''611-	 2 
 
	nn&&&O
 '  	//###I	sZ   BC: C!C:&C .C C
C C:
C C7C2*C-+C22C77C:c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r  rE   )rF   s   "rG   rH   r^  *  s<      %  % %  % 	 %
   % 
 %rI   c                	H  "   VP                  V4      p VP                  4       G R j  xL
 p V P                  VVVR7      G R j  xL
 p  VP                  V4      G R j  xL
 p\        T4      Tn        TP                  4       G R j  xL
  TpTP                  T4       Ku   Ly L^ LE  \         d    Tu TP                  4       G R j  xL 
  # i ; i LK  \         d!   pTP                  4       G R j  xL 
  ThR p?ii ; i  TP                  4       G R j  xL 
  i ; i5i)Nr  )async_auth_flow	__anext__r  asendStopAsyncIterationr   r   r  rz  r  r  r  s	   &&&&&    rG   r  AsyncClient._send_handling_auth*  s     ((1		%%//11G!%!>!>%5# "? " 
(-6__X-F'F (,G}H$"..****GNN8,# 2 (G- (' ""$$$( + % "//+++I ""$$$s   D"D B"D B$D B(  B&!B( %#C C	C  D $D &B( (C5C 6D"	C
D"CC D!C<4C75C<<DD DDDD"c               (    V ^8  d   QhRRRRRRRR/# r  rE   )rF   s   "rG   rH   r^  L  s2     " "" "  	"
 
"rI   c                	r  "    \        V4      V P                  8  d   \        RVR7      hV P                  R,           F  pV! V4      G Rj  xL
  K  	  V P	                  V4      G Rj  xL
 p V P                  R,           F  pV! V4      G Rj  xL
  K  	  \        V4      Vn        VP                  '       g   V# V P                  W4      pW5.,           pV'       d   VP                  4       G Rj  xL
  K  Wn
        V#  L L Lt L  \         d!   pTP                  4       G Rj  xL 
  ThRp?ii ; i5i)Tr  r[  r   Nr   )r  r   r   r   r  r   r  r  rJ  rz  r  r  r   r  s   &&&&   rG   r  $AsyncClient._send_handling_redirectsL  s     7|d000&'LV]^^)))447m## 5 "66w??H --j99Dx.(( : $(= 555#O66wI!J.#"..***,3)#O' $? ) +
 ! oo'''	s   A
D7DD7)D*D7/!D	 D+D	 <D7=5D	 2D3D	 7D79D	  D7D7D	 D	 	D4D/'D*(D//D44D7c                    V ^8  d   QhRRRR/# r   rE   )rF   s   "rG   rH   r^  p  s      ' h rI   c                  "   V P                  VP                  4      p\        P                  ! 4       p\	        VP
                  \        4      '       g   \        R4      h\        VR7      ;_uu_ 4        VP                  V4      G Rj  xL
 pRRR4       \	        XP
                  \        4      '       g   Q hWn
        \        VP
                  VR7      Vn        V P                  P                  V4       V P                  Vn        \         P#                  RVP$                  VP                  VP&                  VP(                  VP*                  4       V#  L  + '       g   i     L; i5i)r  z>Attempted to send a sync request with an AsyncClient instance.r[  Nr  r  )r  rA   r   r   r   re   r'   r  r   handle_async_requestr   r   r   r  r   r   r  r  r  r	  rR  r
  r  s   &&   rG   r   AsyncClient._send_single_requestp  s     ++GKK8	!!#'../::_``W--&;;GDDH . (//?;;;;"*8??%H$$X.$($:$:!,NNKK!!  ""	
 # E .-s1   A0E'2EEECE'EE$	E'c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r^    r  rI   c               R   "   V P                  RVVVVVVVVR7	      G Rj  xL
 #  L5i)r  rO  r  Nr[  r  s	   &&$$$$$$$rG   r   AsyncClient.get  sB     " \\-! " 

 

 
	
 

   '%'c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r^    r  rI   c               R   "   V P                  RVVVVVVVVR7	      G Rj  xL
 #  L5i)r  r  r  Nr[  r  s	   &&$$$$$$$rG   r  AsyncClient.options  sB     " \\-! " 

 

 
	
 

r  c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r^    r  rI   c               R   "   V P                  RVVVVVVVVR7	      G Rj  xL
 #  L5i)r   rN  r  Nr[  r  s	   &&$$$$$$$rG   r!  AsyncClient.head  sB     " \\-! " 

 

 
	
 

r  c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r^    r%  rI   c               Z   "   V P                  RVVVVVVVVV	V
VVR7      G Rj  xL
 #  L5i)r'  rP  r  Nr[  r(  s   &&$$$$$$$$$$$rG   r)  AsyncClient.post  sN     * \\-! " 
 
 	
 
   "+)+c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r^  
  r%  rI   c               Z   "   V P                  RVVVVVVVVV	V
VVR7      G Rj  xL
 #  L5i)r-  r.  r  Nr[  r(  s   &&$$$$$$$$$$$rG   r/  AsyncClient.put
  sN     * \\-! " 
 
 	
 
r  c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r^  /  r%  rI   c               Z   "   V P                  RVVVVVVVVV	V
VVR7      G Rj  xL
 #  L5i)r3  r4  r  Nr[  r(  s   &&$$$$$$$$$$$rG   r5  AsyncClient.patch/  N     * \\-! " 
 
 	
 
r  c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# r  rE   )rF   s   "rG   rH   r^  T  r  rI   c               R   "   V P                  RVVVVVVVVR7	      G Rj  xL
 #  L5i)r:  r;  r  Nr[  r  s	   &&$$$$$$$rG   r<  AsyncClient.deleteT  sB     " \\-! " 

 

 
	
 

r  c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# r$  rE   )rF   s   "rG   rH   r^  q  r%  rI   c               Z   "   V P                  RVVVVVVVVV	V
VVR7      G Rj  xL
 #  L5i)r@  rQ  r  Nr[  r(  s   &&$$$$$$$$$$$rG   rA  AsyncClient.queryq  r  r  c                   V ^8  d   QhRR/# r{   rE   )rF   s   "rG   rH   r^    s     
) 
)d 
)rI   c                D  "   V P                   \        P                  8w  dy   \        P                  V n         V P                  P	                  4       G Rj  xL
  V P
                  P                  4        F!  pVf   K	  VP	                  4       G Rj  xL
  K#  	  R# R#  LG L5irE  )r   r^   ra   r  r   r  rF  )rq   r   s   & rG   r   AsyncClient.aclose  sw      ;;+,,,%,,DK//((***,,.$,,.(( /	 - + )s*   AB B"B <B BB B c                    V ^8  d   QhRRRR/# )r@   rq   r>   rC   rE   )rF   s   "rG   rH   r^    s      q Q rI   c                	  "   V P                   \        P                  8w  d?   \        P                  R \        P                  R/V P                   ,          p\        V4      h\        P                  V n         V P                  P                  4       G Rj  xL
  V P                  P                  4        F!  pVf   K	  VP                  4       G Rj  xL
  K#  	  V #  LE L5i)rJ  rK  N)
r   r^   r_   r`   ra   r  r  
__aenter__r  rF  )rq   rM  r   s   &  rG   r  AsyncClient.__aenter__  s     ;;+...""$S""%` kkC s##!((oo((***\\((*E &&((( + 	 	+ )s*   BCC"C:CCCCc               (    V ^8  d   QhRRRRRRRR/# rP  rE   )rF   s   "rG   rH   r^    s8     F F,F (F (	F
 
FrI   c                	
  "   \         P                  V n        V P                  P	                  WV4      G R j  xL
  V P
                  P                  4        F#  pVf   K	  VP	                  WV4      G R j  xL
  K%  	  R #  LG L5irk   )r^   ra   r   r  	__aexit__r  rF  )rq   rQ  rR  rS  r   s   &&&& rG   r  AsyncClient.__aexit__  sk      "((oo''YGGG\\((*E ooh9EEE + 	H Fs'   5BA?"BB4B5BBrW  rX  )(rU   rV   rW   rX   rY   r   r   r   rr   r  r  r  rr  r   r   re   r   r  r   r   r   r   r  r  r  r  r  r   r  r!  r)  r/  r5  r<  rA  r   r  r  rZ   rY  rZ  s   @rG   r:   r:   z  s   -^K: "&K: *.	K:
 '+K: '+K: /3K: "&K: K: K: $(K: KOK: !7K: "'K: (K:  3!K:" FJ#K:$ !%K:& 04'K:( )K:* HO+K: K:^ /3!%'/3
2 /3!%'
(	7V
 *.7V $(7V &*7V #'7V *.7V '+7V '+7V 5G7V 5G7V 4F7V 047Vr 1$
 *.1$ $(1$ &*1$ #'1$ *.1$ '+1$ '+1$ 5G1$ 5G1$ 4F1$ 041$ 1$f (G 	(G
 *.(G $((G &*(G #'(G *.(G '+(G '+(G 5G(G 5G(G 4F(G 04(G  &B!(G (GT 4 'E	4
 -4 9`4 8^4 *.4 *.4 '+4 '+4 5G4 5G4 4F4 044 4l- 	-
 5G- 5G-^ %D"H<
 *.	

 '+
 '+
 5G
 5G
 4F
 04
:
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J
 *.	

 '+
 '+
 .@
 5G
 4F
 04
:#
 *.	#

 $(#
 &*#
 #'#
 *.#
 '+#
 '+#
 .@#
 5G#
 4F#
 04#
J
) F FrI   )rr  r:   r;   )g
__future__r   r   enumloggingr   typingr  collections.abcr   r   
contextlibr   r   typesr   r	   r   r
   r   r   _configr   r   r   r   r   r   r   r   r   r   r   	_decodersr   _exceptionsr   r   r   r   _modelsr   r   r   r    _sser!   _status_codesr"   _transportsr#   r$   _transports.baser%   r&   _typesr'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   _urlsr4   r5   _utilsr6   r7   TYPE_CHECKINGsslr  r8   r9   __all__TypeVarr<   r>   rR   rT   rr  	getLoggerr  r   r]  keysr   Enumr^   rc   r   CallableAny	EventHookr   r;   r:   )r   s   0rG   <module>r     s   "       5 :  $ 0 0    *  9 8    : ?    $ 7	H
9 NN3h'
NN3m,  ( &'  
		8	$k]+
)),>,C,C,E[,ESPZIZSS,E[\$)) n ($ $4 OOCO,	@W @WFACZ ACHCF* CFS( \s   G#*G#