+
     h
=  c                  s   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t^ RI
t^ RIt^ RIt^ RIt^ RIt^RIHt ^RIHt ^RIHt ^RIHt ]P0                  '       d   ^ RItR R ltR	 R
 ltRmR R lltR R ltRmR R lltR R ltR R lt ]PB                  ]PB                  ]"]"3,          R3,          t#]PB                  ]#R3,          t$]PJ                  ]"]PL                  ]"]$]#3,          3,          t'R R lt(RmR R llt)R R lt*R R lt+R R  lt,R! R" lt-]P\                  ! RR#7      ]P^                  ! R$]"R%7      ]P`                  ! R&R'R(]"R)R*7      ]P`                  ! R+R,R-]"]"3R.R/R07      ]P`                  ! R1R2R3]"R4R*7      ]P`                  ! R5R6R7]"]"3R.R8R07      ]P`                  ! R9R:R;]"]Pb                  ! R<R=7      3R.R>R07      ]P`                  ! R?R@RA]"]+RBRC7      ]P`                  ! RDRERF]"]"3R.RGR07      ]P`                  ! RHRI]"]"3R.RJR07      ]P`                  ! RKRL]"]"3Rn],RMRN7      ]P`                  ! RORP]"RRQRR7      ]P`                  ! RSRT]2RURVRR7      ]P`                  ! RWRXR.RRYRZ7      ]P`                  ! R[R\R.R.R]RZ7      ]P`                  ! R^R_]3R.RR`Ra7      ]P`                  ! Rb]Pb                  ! Rc4      RdR*7      ]P`                  ! ReRf]3R.RRgRa7      ]P`                  ! RhR.R.R]-RiRj7      Rk Rl l4       4       4       4       4       4       4       4       4       4       4       4       4       4       4       4       4       4       4       t4R# )oi    )annotationsN)Client)RequestError)Response)codesc               s    V ^8  d   QhRR/# )   returnNone Zformat   "0/usr/lib/python3.14/site-packages/httpx/_main.py__annotate__r      s     J JD J    c                 s<   \         P                  P                  4       p V P                  R RR7       V P                  4        V P                  RRR7       V P                  4        V P                  RRR7       V P                  4        \         P                  P
                  P                  ^RR7      pVP                  RRRR	R
7       VP                  R4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  RR4       VP                  R R!4       VP                  R"R#4       VP                  R$R%4       VP                  R&R'4       VP                  R(R)4       VP                  R*R+4       VP                  R,R-4       V P                  V4       R.# )/z[bold]HTTPX :butterfly:Zcenter)justifyzA next generation HTTP client.z7Usage: [bold]httpx[/bold] [cyan]<URL> [OPTIONS][/cyan] ZleftT)ZpaddingZpad_edgeZ	ParameterZbold)Zno_wrapr   ZstyleZ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.N)	richconsoleConsoleprinttableZTableZgridZ
add_columnZadd_row)r#   r&   s     r   
print_helpr'      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%r   c                    V ^8  d   QhRRRR/# )r   responser   r   strr   r	   r
   r   r   r   g   s     
 
X 
# 
r   c                s\   V P                   P                  R 4      pVeg   VP                  R4      w  p p \        P                  ! \
        \        P                  P                  VP                  4       4      P                  4      # R#   \        P                  P                   d     R# i ; i)zContent-TypeZ; )headersgetZ	partitiontypingZcastr*   pygmentsZlexersZget_lexer_for_mimetypeZstripnameZutilZClassNotFound)r)   Zcontent_typeZ	mime_typeZ_s   &   r   get_lexer_for_responser1   g   s    ##''7L&005	1a	;;X__;;IOO<MNSS 
  }}** 		s   AB B+*B+Fc               $    V ^8  d   QhRRRRRR/# )r   requesthttpcore.Requesthttp2boolr   r*   r   r	   r
   r   r   r   t   s"     
 
$4 
T 
c 
r   c           
     s   V'       d   R MRpV P                    UUu. uF!  w  r4V'       d   VP                  4       MTV3NK#  	  pppV P                  P                  R4      pV P                  P
                  P                  R4      pV RV RV 2.V UUu. uF*  w  r4VP                  R4       RVP                  R4       2NK,  	  upp,           pRP                  V4      # u uppi u uppi )zHTTP/2zHTTP/1.1ascii : 
)r,   lowermethoddecodeurltargetjoin)	r3   r5   versionr0   valuer,   r<   r?   liness	   &&       r   format_request_headersrD   t   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 0C&c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   http_versionbytesstatusintreason_phrasebytes | Noner,   list[tuple[bytes, bytes]]r   r*   r   r	   r
   r   r   r      s:         '	
 	r   c           
     s:   V P                  R 4      pVf   \        P                  ! V4      MVP                  R 4      pV RV RV 2.V UUu. uF*  w  rgVP                  R 4       RVP                  R 4       2NK,  	  upp,           pRP                  V4      # u uppi )r7   r8   r9   r:   )r=   r   Zget_reason_phraser@   )	rF   rH   rJ   r,   rA   Zreasonr0   rB   rC   s	   &&&&     r   format_response_headersrM      s     !!'*G   	'!!'* 
 y&6(+,NU0NU{t4;;w
 5<<#8"9:g0 E 99U0s   0Bc               r2   )r   r3   r4   r5   r6   r   r   r   r	   r
   r   r   r      s"      #3 D T r   c                s*   \         P                  P                  4       p\        WR 7      p\         P                  P                  VRRRR7      pVP                  V4       \         P                  P                  RRRRR7      pVP                  V4       R# )r5   http	ansi_darkTZthemeZ	word_wrapr+   N)r"   r#   r$   rD   syntaxSyntaxr%   )r3   r5   r#   	http_textrR   s   &&   r   print_request_headersrU      sq    ll""$G&w<I[[	6PTUFMM&[[F+NFMM&r   c          
     rE   )r   rF   rG   rH   rI   rJ   rK   r,   rL   r   r   r   r	   r
   r   r   r      s:         '	
 
r   c                s*   \         P                  P                  4       p\        WW#4      p\         P                  P                  VR RRR7      pVP                  V4       \         P                  P                  RR RRR7      pVP                  V4       R# )rO   rP   TrQ   r+   N)r"   r#   r$   rM   rR   rS   r%   )rF   rH   rJ   r,   r#   rT   rR   s   &&&&   r   print_response_headersrV      su     ll""$G'mUI[[	6PTUFMM&[[F+NFMM&r   c               r(   )r   r)   r   r   r   r   r	   r
   r   r   r      s     I IX I$ Ir   c                s   \         P                  P                  4       p\        V 4      pV'       d   VP	                  4       R 8X  d+    V P                  4       p\
        P                  ! V^R7      pMV P                  p\         P                  P                  WBRRR7      pVP                  V4       R# VP                  R\        V P                  4       R24       R#   \         d    T P                  p Lxi ; i)json)ZindentrP   TrQ   Z<z bytes of binary data>N)r"   r#   r$   r1   r;   rW   ZdumpsZ
ValueErrortextrR   rS   r%   lencontent)r)   r#   Z
lexer_namedatarX   rR      &     r   print_responser]      s    ll""$G'1J'%}}zz$q1 ==D##DKSW#Xf#h../00FGH  %}}%s   (C C65C6.c               r(   )r   cert_PeerCertRetDictTyper   r*   r   r	   r
   r   r   r      s      1 c r   c           
     s8   . pV P                  4        F  w  r#\        V\        \        34      '       d   VP	                  R V R24       V F  pVR9   d2   V F)  pVP	                  RV^ ,           RV^,          : 24       K+  	  K;  \        V\        4      '       d9   \        V4      ^8X  d)   VP	                  RV^ ,           RV^,          : 24       K  VP	                  RV: 24       K  	  K  VP	                  R V RV: 24       K  	  RP                  V4      # )z*   Z:z*     r9   r:   )ZsubjectZissuer)ZitemsZ
isinstancelistZtupleZappendrY   r@   )r^   rC   ZkeyrB   ZitemZsub_itemr\   r   format_certificatera      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r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r0   r*   infoztyping.Mapping[str, typing.Any]verboser6   r   r   r   r	   r
   r   r   r      s2     $M $M
$M4$M?C$M	$Mr   c                s   \         P                  P                  4       pV R 8X  d)   V'       d!   VR,          pVP                  RV: 24       R# V R8X  dK   V'       dC   VR,          pVP	                  R4      pVP                  RV^ ,          : RV^,           24       R# V R8X  d   V'       d   VR,          pVP	                  R	4      pVP                  4       pVP                  4       p	VP                  4       p
VP                  4       pVP                  R
V: RV	^ ,          : 24       VP                  RV: 24       V
'       d.   VP                  R4       VP                  \        V
4      4       R# R# V R8X  d!   V'       d   VR,          p\        VRR7       R# V R8X  d!   V'       d   VR,          p\        VRR7       R# V R8X  d   VR,          w  rpp\        WVV4       R# V R8X  d    VR,          w  ppRpRp\        WVV4       R# R# )zconnection.connect_tcp.startedhostz* Connecting to zconnection.connect_tcp.completeZreturn_valueserver_addrz* Connected to z	 on port zconnection.start_tls.complete
ssl_objectz* SSL established using z / z* Selected ALPN protocol: z* Server certificate:z#http11.send_request_headers.startedr3   FrN   z"http2.send_request_headers.startedTz(http11.receive_response_headers.completez'http2.receive_response_headers.completes   HTTP/2N)r"   r#   r$   r%   Zget_extra_inforA   cipherZgetpeercertZselected_alpn_protocolra   rU   rV   )r0   rc   rd   r#   re   streamrf   rg   rA   rh   Zserver_certZalpnr3   rF   rH   rJ   r,   s   &&&              r   tracerj      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	 
;r   c               r2   )r   r)   r   downloadztyping.BinaryIOr   r   r   r	   r
   r   r   r      s&     T T TO T Tr   c           	     s   \         P                  P                  4       pVP                  4        V P                  P                  R 4      p\         P                  P                  RR\         P                  P                  RR7      \         P                  P                  4       \         P                  P                  4       4      ;_uu_ 4       pR\         P                  P                  VP                  4       2pTP                  T\        T;'       g    ^ 4      VRJR7      pV P!                  4        F0  pVP#                  V4       VP%                  W`P&                  R7       K2  	  RRR4       R#   + '       g   i     R# ; i)zContent-Lengthz([progress.description]{task.description}z-[progress.percentage]{task.percentage:>3.0f}%N)Z	bar_widthzDownloading [bold])ZtotalZstart)Z	completed)r"   r#   r$   r%   r,   r-   progressZProgressZ	BarColumnZDownloadColumnZTransferSpeedColumnZmarkupZescaper0   Zadd_taskrI   Z
iter_bytesZwriteZupdateZnum_bytes_downloaded)r)   rk   r#   Zcontent_lengthrl   ZdescriptionZdownload_taskZchunks   &&      r   download_responserm      s%   ll""$GMMO%%))*:;N			27$/$$&))+
 
 
*4;;+=+=hmm+L*MN ))n))* , * 

 ((*ENN5!OOM5R5ROS +
 
 
 
s   BE//F 	c               (    V ^8  d   QhRRRRRRRR/# r   ctxclick.Contextparamclick.Option | click.ParameterrB   
typing.Anyr   r   r	   r
   r   r   r     s0     3 3	3)3 3 	3r   c                s    Vf   R #  \         P                  ! V4      #   \         P                   d    \        P                  ! R4      hi ; i)NzNot valid JSON)rW   ZloadsZJSONDecodeErrorclickZBadParameterrp   rr   rB      &&&r   validate_jsonrx     sG    
 }3zz%   3  !1223s	    ,A
c               rn   ro   r   r	   r
   r   r   r     s0        	 )    	 r   c                s`    VR8X  d   R # Vw  r4VR8X  d   \         P                  ! RRR7      pW43# )NZ-ZPasswordT)Z
hide_inputNN)ru   Zprompt)rp   rr   rB   ZusernameZpasswords   &&&  r   validate_authrz     s7    
 H3<<
t<r   c               rb   )	r   rp   rq   rr   rs   rB   rt   r   r   r   r	   r
   r   r   r   -  s0     	 			)	 	 
		r   c                sr    V'       d   V P                   '       d   R # \        4        V P                  4        R # )N)Zresilient_parsingr'   exitrv   rw   r   handle_helpr|   -  s#    
 C)))LHHJr   )Zadd_help_optionr>   )typez--methodz-mr<   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}   Zmultipler~   z	--contentz-crZ   r   z--dataz-dr[   r   z--filesz-ffilesZrb)Zmoder   z--jsonz-jrW   r   )r}   callbackr~   z	--headersz-hr,   r   z	--cookiescookiesr   z--authauthr   )r}   defaultr   r~   z--proxyproxyr   )r}   r   r~   z	--timeouttimeoutg      @r   r   follow_redirectsr   )is_flagr   r~   r   verifyr   r   r5   r   )r}   r   r   r~   z
--downloadZwbr   z	--verbosez-vz*Verbose. Show request as well as response.r    r!   )r   Zis_eagerZexpose_valuer   r~   c          $     s`    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   zlist[tuple[str, str]]rZ   r[   r   zlist[tuple[str, click.File]]rW   r,   r   r   ztuple[str, str] | Noner   r   floatr   r6   r   r5   rk   ztyping.BinaryIO | Nonerd   r   r   r   r	   r
   r   r   r     s     6. 6.	6.6. "6. 	6.
  6. (6. 6. #6. #6. !6. 6. 6. 6. 6. 6.  %!6." #6.$ 
%6.r   c                sz   V'       g%   V'       g   V'       g   V'       g	   V'       d   RMRp \        WWR7      ;_uu_ 4       pVP                  VV \        V4      V\        V4      VVV\        V4      V	VR\        P
                  ! \        VR7      /R7      ;_uu_ 4       pVe   \        VV4       M-VP                  4        VP                  '       d   \        V4       RRR4       RRR4       \$        P&                  ! XP(                  '       d	   ^ 4       R# ^4       R#   + '       g   i     LJ; i  + '       g   i     LU; i  \         di   p\        P                  P                  4       pTP                  R\!        T4      P"                   R	T 24       \$        P&                  ! ^4        Rp?LRp?ii ; i)
zI
An HTTP command line client.
Sends a request and displays the response.
ZPOSTZGET)r   r   r5   r   rj   )rd   )
r   rZ   r[   r   rW   r,   r   r   r   Z
extensionsNz[red]z[/red]: )r   ri   r`   Zdict	functoolsZpartialrj   rm   ZreadrZ   r]   r   r"   r#   r$   r%   r}   Z__name__sysr{   Z
is_success)r>   r<   r   rZ   r[   r   rW   r,   r   r   r   r   r   r   r5   rk   rd   Zclientr)   Zexcr#   s   &&&&&&&&&&&&&&&&&    r   mainr   9  sH   D "det%MMQWF|$ZW!1#Y%6%6ug%NO    '%h9MMO'''&x0' N6 HH(%%%Q-1-5  NM,  ,,&&(d3i001#?@sU   E AD4 3D!	D!	D4'E !D1,D44E	?E E F:AF55F:)Fry   )5Z
__future__r    r   rW   r   r.   ru   Zpygments.lexersr/   Zpygments.utilZrich.consoler"   Zrich.markupZrich.progressZrich.syntaxZ
rich.tableZ_clientr   Z_exceptionsr   Z_modelsr   Z_status_codesr   ZTYPE_CHECKINGZhttpcorer'   r1   rD   rM   rU   rV   r]   ZTupler*   Z_PCTRTTZ_PCTRTTTZDictZUnionr_   ra   rj   rm   rx   rz   r|   ZcommandZargumentZoptionZFiler   r6   r   r   r   r   <module>r      s   "   
           %   	JZ

$I& ,,v||CH-s2
3<<%{{3S(G5K(L#LM $$MNT,3 	 u%C 		@	 
s	: 		7 

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

s	L 		T 		?	 	* 	$ 		K 	D		J
 		5 	&6.		 ! &V6.r   