
    Ii=              7       
   S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKr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  SSKJr  SSKJr  SSKJr  SnS jrS	\S\4S
 jrSoS\R4                  S\S\4S jjrS\S\S\R>                  \   S\R@                  \RB                  \\4      S\4
S jr"SoS\R4                  S\SS4S jjr#S\S\S\R>                  \   S\R@                  \RB                  \\4      SS4
S jr$S	\SS4S jr%\RB                  \RB                  \\4   S4   r&\RB                  \&S4   r'\RP                  \\RR                  \\'\&4   4   r*S\*S\4S jr+ SoS\S\RX                  \\RZ                  4   S\SS4S jjr.S	\S\R^                  SS4S jr0S \Rb                  S!\RR                  \Rd                  \Rf                  4   S"\RZ                  S\RZ                  4S# jr4S \Rb                  S!\RR                  \Rd                  \Rf                  4   S"\RZ                  S\RZ                  4S$ jr5S \Rb                  S!\RR                  \Rd                  \Rf                  4   S"\RZ                  SS4S% jr6\Rn                  " SS&9\Rp                  " S'\S(9\Rr                  " S)S*S+\S,S-9\Rr                  " S.S/S0\\4S1S2S39\Rr                  " S4S5S6\S7S-9\Rr                  " S8S9S:\\4S1S;S39\Rr                  " S<S=S>\\Rt                  " S?S@94S1SAS39\Rr                  " SBSCSD\\4SESF9\Rr                  " SGSHS\\4S1SIS39\Rr                  " SJSK\\4S1SLS39\Rr                  " SMSN\\4SO\5SPSQ9\Rr                  " SRSS\SSTSU9\Rr                  " SVSW\;SXSYSU9\Rr                  " SZS[S1SS\S]9\Rr                  " S^S_S1S1S`S]9\Rr                  " SaS\S1SSbSc9\Rr                  " Sd\Rt                  " Se5      SfS-9\Rr                  " SgSh\S1SSiSc9\Rr                  " SjS1S1S\6SkSl9S'\S+\S0\R@                  \RB                  \\4      S6\S:\R@                  \RB                  \\4      S>\R@                  \RB                  \\Rt                  4      SD\S\R@                  \RB                  \\4      SK\R@                  \RB                  \\4      SN\R>                  \RB                  \\4      SS\SW\;S[\S_\S\S\R>                  \R^                     S\SS4$Sm j5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       r<g)p    N   )Client)RequestError)Response)codesreturnc                     [         R                  R                  5       n U R                  SSS9  U R                  5         U R                  SSS9  U R                  5         U R                  SSS9  U R                  5         [         R                  R
                  R                  SSS	9nUR                  S
SSSS9  UR                  S5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  S S!5        UR                  S"S#5        UR                  S$S%5        UR                  S&S'5        UR                  S(S)5        UR                  S*S+5        UR                  S,S-5        UR                  S.S/5        U R                  U5        g )0Nz[bold]HTTPX :butterfly:center)justifyzA next generation HTTP client.z7Usage: [bold]httpx[/bold] [cyan]<URL> [OPTIONS][/cyan] leftr   T)paddingpad_edge	Parameterbold)no_wrapr   styleDescriptionz-m, --method [cyan]METHODz{Request method, such as GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD.
[Default: GET, or POST if a request body is included]z#-p, --params [cyan]<NAME VALUE> .../Query parameters to include in the request URL.z-c, --content [cyan]TEXT,Byte content to include in the request body.z!-d, --data [cyan]<NAME VALUE> ...)Form data to include in the request body.z%-f, --files [cyan]<NAME FILENAME> ...*Form files to include in the request body.z-j, --json [cyan]TEXT)JSON data to include in the request body.z$-h, --headers [cyan]<NAME VALUE> .../Include additional HTTP headers in the request.z --cookies [cyan]<NAME VALUE> ..."Cookies to include in the request.z--auth [cyan]<USER PASS>Username and password to include in the request. Specify '-' for the password to use a password prompt. Note that using --verbose/-v will expose the Authorization header, including the password encoding in a trivially reversible format.z--proxy [cyan]URLISend the request via a proxy. Should be the URL giving the proxy address.z--timeout [cyan]FLOATzTimeout value to use for network operations, such as establishing the connection, reading some data, etc... [Default: 5.0]--follow-redirectsAutomatically follow redirects.--no-verifyDisable SSL verification.--http2@Send the request using HTTP/2, if the remote server supports it.z--download [cyan]FILE?Save the response content as a file, rather than displaying it.z-v, --verbosez1Verbose output. Show request as well as response.--helpShow this message and exit.)	richconsoleConsoleprinttableTablegrid
add_columnadd_row)r(   r+   s     1/venv/lib/python3.13/site-packages/httpx/_main.py
print_helpr1      s   ll""$GMM+XM>MMOMM2HMEMMOMMA6   MMOJJ!!!d!;E	[$fM	]#	MM#	@
 
MM-9 
MM"$R 
MM+-X 
MM/4 
MM)+VW	MM.9 
MM*,P 
MM"	- 
MMS
 
MM	@ 
MM&(IJ	MM-!<=	MMU 
MMI
 
MM/#VW	MM(9:MM%    responsec                 T   U R                   R                  S5      nUbf  UR                  S5      u  n  n [        R                  " [
        [        R                  R                  UR                  5       5      R                  5      $ g! [        R                  R                   a     gf = f)NzContent-Type; )headersget	partitiontypingcaststrpygmentslexersget_lexer_for_mimetypestripnameutilClassNotFound)r3   content_type	mime_type_s       r0   get_lexer_for_responserG   c   s    ##''7L&005	1a	;;X__;;IOO<MNSS 
  }}** 		s   AB B'&B'Frequesthttp2c           
         U(       a  SOSnU R                    VVs/ s H   u  p4U(       a  UR                  5       OUU4PM"     nnnU R                  R                  S5      nU R                  R
                  R                  S5      nU SU SU 3/U VVs/ s H*  u  p4UR                  S5       SUR                  S5       3PM,     snn-   nSR                  U5      $ s  snnf s  snnf )NzHTTP/2zHTTP/1.1ascii : 
)r7   lowermethoddecodeurltargetjoin)	rH   rI   versionrA   valuer7   rP   rS   liness	            r0   format_request_headersrX   p   s    hZGDKOODS[TD%0O   ^^""7+F[[&&w/Fxq'+,NU0NU{t4;;w
 5<<#8"9:g0 E 99U
0s   'C1C"http_versionstatusreason_phraser7   c           
      2   U R                  S5      nUc  [        R                  " U5      OUR                  S5      nU SU SU 3/U VVs/ s H*  u  pgUR                  S5       SUR                  S5       3PM,     snn-   nSR                  U5      $ s  snnf )NrK   rL   rM   rN   )rQ   r   get_reason_phraserT   )	rY   rZ   r[   r7   rU   reasonrA   rV   rW   s	            r0   format_response_headersr_   }   s     !!'*G   	'!!'* 
 y&6(+,NU0NU{t4;;w
 5<<#8"9:g0 E 99U0s   1Bc                    [         R                  R                  5       n[        XS9n[         R                  R                  USSSS9nUR                  U5        [         R                  R                  SSSSS9nUR                  U5        g )NrI   http	ansi_darkTtheme	word_wrapr6   )r'   r(   r)   rX   syntaxSyntaxr*   )rH   rI   r(   	http_textrg   s        r0   print_request_headersrj      sq    ll""$G&w<I[[	6PTUFMM&[[F+NFMM&r2   c                    [         R                  R                  5       n[        XX#5      n[         R                  R                  USSSS9nUR                  U5        [         R                  R                  SSSSS9nUR                  U5        g )Nrb   rc   Trd   r6   )r'   r(   r)   r_   rg   rh   r*   )rY   rZ   r[   r7   r(   ri   rg   s          r0   print_response_headersrl      su     ll""$G'mUI[[	6PTUFMM&[[F+NFMM&r2   c                    [         R                  R                  5       n[        U 5      nU(       ax  UR	                  5       S:X  a'   U R                  5       n[
        R                  " USS9nOU R                  n[         R                  R                  XBSSS9nUR                  U5        g UR                  S[        U R                  5       S35        g ! [         a    U R                  n Nrf = f)	Njson   )indentrc   Trd   <z bytes of binary data>)r'   r(   r)   rG   rO   rn   dumps
ValueErrortextrg   rh   r*   lencontent)r3   r(   
lexer_namedatart   rg   s         r0   print_responsery      s    ll""$G'1J'%}}zz$q1 ==D##DKSW#Xf#h../00FGH  %}}%s   %C C+*C+.certc           
         / nU R                  5        H  u  p#[        U[        [        45      (       a  UR	                  SU S35        U H  nUS;   a)  U H!  nUR	                  SUS    SUS   < 35        M#     M2  [        U[        5      (       a/  [        U5      S:X  a   UR	                  SUS    SUS   < 35        Mv  UR	                  SU< 35        M     M  UR	                  SU SU< 35        M     S	R                  U5      $ )
Nz*   :)subjectissuerz*     r   rM   r      rN   )items
isinstancelisttupleappendru   rT   )rz   rW   keyrV   itemsub_items         r0   format_certificater      s    Ejjl
edE]++LL4uA'//$(vhqk]"Xa[O%LM %)e,,TaLL6$q'"T!WK!@ALL6$!23  LL4uBui01 # 99Ur2   rA   infoverbosec                    [         R                  R                  5       nU S:X  a"  U(       a  US   nUR                  SU< 35        g U S:X  a<  U(       a5  US   nUR	                  S5      nUR                  SUS   < S	US
    35        g U S:X  a  U(       a  US   nUR	                  S5      nUR                  5       nUR                  5       n	UR                  5       n
UR                  5       nUR                  SU< SU	S   < 35        UR                  SU< 35        U
(       a,  UR                  S5        UR                  [        U
5      5        g g U S:X  a  U(       a  US   n[        USS9  g U S:X  a  U(       a  US   n[        USS9  g U S:X  a  US   u  pnn[        XUU5        g U S:X  a  US   u  nnSnS n[        XUU5        g g )Nzconnection.connect_tcp.startedhostz* Connecting to zconnection.connect_tcp.completereturn_valueserver_addrz* Connected to r   z	 on port r   zconnection.start_tls.complete
ssl_objectz* SSL established using z / z* Selected ALPN protocol: z* Server certificate:z#http11.send_request_headers.startedrH   Fra   z"http2.send_request_headers.startedTz(http11.receive_response_headers.completez'http2.receive_response_headers.completes   HTTP/2)r'   r(   r)   r*   get_extra_inforU   ciphergetpeercertselected_alpn_protocolr   rj   rl   )rA   r   r   r(   r   streamr   r   rU   r   server_certalpnrH   rY   rZ   r[   r7   s                    r0   tracer      s    ll""$G//GF|(12	2	2wn%++M:A'9;q>BRST	0	0Wn%**<8
$$&""$ ,,.00203vaymLM24(;<MM12MM,[9:  
6	67y/gU3	5	5'y/gT2	;	;7;N7K4mW|]GL	:	:~. |]GL	 
;r2   downloadc                    [         R                  R                  5       nUR                  5         U R                  R                  S5      n[         R                  R                  SS[         R                  R                  S S9[         R                  R                  5       [         R                  R                  5       5       nS[         R                  R                  UR                  5       3nUR                  U[        U=(       d    S5      US LS9nU R!                  5        H-  nUR#                  U5        UR%                  X`R&                  S9  M/     S S S 5        g ! , (       d  f       g = f)	NzContent-Lengthz([progress.description]{task.description}z-[progress.percentage]{task.percentage:>3.0f}%)	bar_widthzDownloading [bold]r   )totalstart)	completed)r'   r(   r)   r*   r7   r8   progressProgress	BarColumnDownloadColumnTransferSpeedColumnmarkupescaperA   add_taskint
iter_byteswriteupdatenum_bytes_downloaded)r3   r   r(   content_lengthr   descriptiondownload_taskchunks           r0   download_responser      s   ll""$GMMO%%))*:;N			27$/$$&))+
 
*4;;+=+=hmm+L*MN ))n)* , * 

 ((*ENN5!OOM5R5ROS +
 
 
s    BE
E*ctxparamrV   c                     Uc  g  [         R                  " U5      $ ! [         R                   a    [        R                  " S5      ef = f)NzNot valid JSON)rn   loadsJSONDecodeErrorclickBadParameterr   r   rV   s      r0   validate_jsonr     sG    
 }3zz%   3  !1223s	    +Ac                 T    US:X  a  g Uu  p4US:X  a  [         R                  " SSS9nX44$ )NNN-PasswordT)
hide_input)r   prompt)r   r   rV   usernamepasswords        r0   validate_authr     s7    
 H3<<
t<r2   c                 j    U(       a  U R                   (       a  g [        5         U R                  5         g )N)resilient_parsingr1   exitr   s      r0   handle_helpr   )  s     
 C))LHHJr2   )add_help_optionrR   )typez--methodz-mrP   z{Request method, such as GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD. [Default: GET, or POST if a request body is included])r   helpz--paramsz-pparamsTr   )r   multipler   z	--contentz-crv   r   z--dataz-drx   r   z--filesz-ffilesrb)moder   z--jsonz-jrn   r   )r   callbackr   z	--headersz-hr   z	--cookiescookiesr   z--authauthr   r   )r   defaultr   r   z--proxyproxyr   )r   r   r   z	--timeouttimeoutg      @r   r   follow_redirectsr   )is_flagr   r   r    verifyr!   r"   r#   )r   r   r   r   z
--downloadwbr$   z	--verbosez-vz*Verbose. Show request as well as response.r%   r&   )r   is_eagerexpose_valuer   r   c                 .   U(       d   U(       d  U(       d  U(       d  U(       a  SOSn [        U
UUUS9 nUR                  UU [        U5      U[        U5      UUU[        U5      U	US[        R
                  " [        US90S9 nUb  [        UU5        O,UR                  5         UR                  (       a  [        U5        SSS5        SSS5        [$        R&                  " WR(                  (       a  S5        gS
5        g! , (       d  f       NE= f! , (       d  f       NN= f! [         ah  n[        R                  R                  5       nUR                  S[!        U5      R"                   S	U 35        [$        R&                  " S
5         SnANSnAff = f)zI
An HTTP command line client.
Sends a request and displays the response.
POSTGET)r   r   r   rI   r   )r   )
r   rv   rx   r   rn   r7   r   r   r   
extensionsNz[red]z[/red]: r   r   )r   r   r   dict	functoolspartialr   r   readrv   ry   r   r'   r(   r)   r*   r   __name__sysr   
is_success)rR   rP   r   rv   rx   r   rn   r7   r   r   r   r   r   r   rI   r   r   clientr3   excr(   s                        r0   mainr   5  sG   D "det	

 F|$ZW!1#Y%6%6ug%NO   '%h9MMO''&x0'
@ HH(%%Q-1-5 
 
6  ,,&&(d3i001#?@sN   D" AD=D D	D"  
D	
D
DD" D" "
F,AFF)r   N)F)=r   rn   r   r:   r   httpcorepygments.lexersr=   pygments.utilrich.consoler'   rich.markuprich.progressrich.syntax
rich.table_clientr   _exceptionsr   _modelsr   _status_codesr   r1   r<   rG   RequestboolrX   bytesr   OptionalListTupler_   rj   rl   ry   _PCTRTT_PCTRTTTDictUnion_PeerCertRetDictTyper   MappingAnyr   BinaryIOr   ContextOptionr   r   r   r   commandargumentoptionFilefloatr    r2   r0   <module>r
     s     
            %   JZ
X 
# 

H$4$4 
T 
c 
 ??5) [[eUl34	
 	$8#3#3 D T  ??5) [[eUl34	
 
IX I$ I& ,,v||CH-s2
3<<%{{3S(G5K(L#LM 1 c & GL$M
$M^^CO4$M?C$M	$MNT TFOO T T,3	3<<eoo563 ::3 ZZ	3 	 <<eoo56  ::  ZZ	 			<<eoo56	 ::	 
		 u%C 		@	 
s	: 		7 

s	4 
uzzt$	%	5 
		4 
s	: 
s	- 

s	L 		T 		?	 	* 	$ 		K 	D		J
 		5 	&;.	;.;. KKS#X./;. 	;.
 ++fll38,
-;. ;;v||CO45;. ;. [[c3h/0;. [[c3h/0;. //&,,sCx0
1;. ;. ;. ;. ;. ;.  oofoo.!;." #;.$ 
%;.		 ! &V;.r2   