
    F\h                      t    S SK JrJrJr  SS/r\" \5       " S S5      5       r\" \5       " S S5      5       rg)    )StrEnumIntEnum_simple_enum
HTTPStatus
HTTPMethodc                   z   \ rS rSrSrSIS jr\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       rS	rS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!Sr"S r#S!r$S"r%S#r&S$r'S%r(S&r)S'r*S(r+S)r,S*r-S+r.S,r/\/r0S-r1\1r2S.r3S/r4\4r5S0r6S1r7S2r8S3r9\9r:S4r;S5r<S6r=S7r>S8r?S9r@S:rAS;rBS<rCS=rDS>rES?rFS@rGSArHSBrISCrJSDrKSErLSFrMSGrNgH)Jr      a	  HTTP status codes and reason phrases

Status codes from the following RFCs are all observed:

    * RFC 9110: HTTP Semantics, obsoletes 7231, which obsoleted 2616
    * RFC 6585: Additional HTTP Status Codes
    * RFC 3229: Delta encoding in HTTP
    * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
    * RFC 5842: Binding Extensions to WebDAV
    * RFC 7238: Permanent Redirect
    * RFC 2295: Transparent Content Negotiation in HTTP
    * RFC 2774: An HTTP Extension Framework
    * RFC 7725: An HTTP Status Code to Report Legal Obstacles
    * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
    * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
    * RFC 8297: An HTTP Status Code for Indicating Hints
    * RFC 8470: Using Early Data in HTTP
c                 T    [         R                  X5      nXl        X$l        X4l        U$ N)int__new___value_phrasedescription)clsvaluer   r   objs        $/usr/lib/python3.13/http/__init__.pyr   HTTPStatus.__new__   s$    kk#%
%
    c                 ,    SU s=:*  =(       a    S:*  $ s  $ )Nd       selfs    r   is_informationalHTTPStatus.is_informational!       d!!c!!!!r   c                 ,    SU s=:*  =(       a    S:*  $ s  $ )N   i+  r   r   s    r   
is_successHTTPStatus.is_success%   r   r   c                 ,    SU s=:*  =(       a    S:*  $ s  $ )N,  i  r   r   s    r   is_redirectionHTTPStatus.is_redirection)   r   r   c                 ,    SU s=:*  =(       a    S:*  $ s  $ )N  i  r   r   s    r   is_client_errorHTTPStatus.is_client_error-   r   r   c                 ,    SU s=:*  =(       a    S:*  $ s  $ )N  iW  r   r   s    r   is_server_errorHTTPStatus.is_server_error1   r   r   )r   Continuez!Request received, please continue)e   zSwitching Protocolsz.Switching to new protocol; obey Upgrade header)f   
Processing)g   zEarly Hints)r!   OKz#Request fulfilled, document follows)   CreatedzDocument created, URL follows)   Acceptedz/Request accepted, processing continues off-line)   zNon-Authoritative InformationzRequest fulfilled from cache)   z
No Contentz"Request fulfilled, nothing follows)   zReset Contentz"Clear input form for further input)   zPartial ContentzPartial content follows)   zMulti-Status)   zAlready Reported)   zIM Used)r%   zMultiple Choicesz,Object has several resources -- see URI list)i-  zMoved Permanently(Object moved permanently -- see URI list)i.  Found(Object moved temporarily -- see URI list)i/  z	See Otherz'Object moved -- see Method and URL list)i0  zNot Modifiedz)Document has not changed since given time)i1  z	Use Proxyz@You must use proxy specified in Location to access this resource)i3  zTemporary RedirectrC   )i4  zPermanent RedirectrA   )r)   zBad Requestz(Bad request syntax or unsupported method)i  Unauthorizedz*No permission -- see authorization schemes)i  zPayment Requiredz"No payment -- see charging schemes)i  	Forbiddenz0Request forbidden -- authorization will not help)i  z	Not FoundzNothing matches the given URI)i  zMethod Not Allowedz-Specified method is invalid for this resource)i  zNot Acceptablez%URI not available in preferred format)i  zProxy Authentication Requiredz7You must authenticate with this proxy before proceeding)i  zRequest Timeoutz"Request timed out; try again later)i  ConflictzRequest conflict)i  Gonez5URI no longer exists and has been permanently removed)i  zLength Requiredz"Client must specify Content-Length)i  zPrecondition Failedz Precondition in headers is false)i  zContent Too LargezContent is too large)i  zURI Too LongzURI is too long)i  zUnsupported Media Typez!Entity body in unsupported format)i  zRange Not SatisfiablezCannot satisfy request range)i  zExpectation Failedz'Expect condition could not be satisfied)i  zI'm a Teapotz5Server refuses to brew coffee because it is a teapot.)i  zMisdirected Requestz(Server is not able to produce a response)i  zUnprocessable Content)i  Locked)i  zFailed Dependency)i  z	Too Early)i  zUpgrade Required)i  zPrecondition Requiredz8The origin server requires the request to be conditional)i  zToo Many RequestszOThe user has sent too many requests in a given amount of time ("rate limiting"))i  zRequest Header Fields Too LargezVThe server is unwilling to process the request because its header fields are too large)i  zUnavailable For Legal ReasonszOThe server is denying access to the resource as a consequence of a legal demand)r-   zInternal Server ErrorzServer got itself in trouble)i  zNot Implementedz&Server does not support this operation)i  zBad Gatewayz+Invalid responses from another server/proxy)i  zService Unavailablez8The server cannot process the request due to a high load)i  zGateway Timeoutz4The gateway server did not receive a timely response)i  zHTTP Version Not SupportedzCannot fulfill request)i  zVariant Also Negotiates)i  zInsufficient Storage)i  zLoop Detected)i  zNot Extended)i  zNetwork Authentication Requiredz7The client needs to authenticate to gain network accessr   N) )O__name__
__module____qualname____firstlineno____doc__r   propertyr   r"   r&   r*   r.   CONTINUESWITCHING_PROTOCOLS
PROCESSINGEARLY_HINTSr5   CREATEDACCEPTEDNON_AUTHORITATIVE_INFORMATION
NO_CONTENTRESET_CONTENTPARTIAL_CONTENTMULTI_STATUSALREADY_REPORTEDIM_USEDMULTIPLE_CHOICESMOVED_PERMANENTLYFOUND	SEE_OTHERNOT_MODIFIED	USE_PROXYTEMPORARY_REDIRECTPERMANENT_REDIRECTBAD_REQUESTUNAUTHORIZEDPAYMENT_REQUIRED	FORBIDDEN	NOT_FOUNDMETHOD_NOT_ALLOWEDNOT_ACCEPTABLEPROXY_AUTHENTICATION_REQUIREDREQUEST_TIMEOUTCONFLICTGONELENGTH_REQUIREDPRECONDITION_FAILEDCONTENT_TOO_LARGEREQUEST_ENTITY_TOO_LARGEURI_TOO_LONGREQUEST_URI_TOO_LONGUNSUPPORTED_MEDIA_TYPERANGE_NOT_SATISFIABLEREQUESTED_RANGE_NOT_SATISFIABLEEXPECTATION_FAILEDIM_A_TEAPOTMISDIRECTED_REQUESTUNPROCESSABLE_CONTENTUNPROCESSABLE_ENTITYLOCKEDFAILED_DEPENDENCY	TOO_EARLYUPGRADE_REQUIREDPRECONDITION_REQUIREDTOO_MANY_REQUESTSREQUEST_HEADER_FIELDS_TOO_LARGEUNAVAILABLE_FOR_LEGAL_REASONSINTERNAL_SERVER_ERRORNOT_IMPLEMENTEDBAD_GATEWAYSERVICE_UNAVAILABLEGATEWAY_TIMEOUTHTTP_VERSION_NOT_SUPPORTEDVARIANT_ALSO_NEGOTIATESINSUFFICIENT_STORAGELOOP_DETECTEDNOT_EXTENDEDNETWORK_AUTHENTICATION_REQUIRED__static_attributes__r   r   r   r   r      s7   $ " " " " " " " " " " DH>"J$K 
:B=G;H%I!HJNMGO&L.G84DEKI5LLI444K6L.<I)I91N%C!.O2HAD.O, 0L'-(&;#3AK480F0 I.D4' #%7!(2O7KD@O""<6(M&L'C#r   c                   H    \ rS rSrSrS rS rSrSrSr	Sr
S	rS
rSrSrSrSrg)r      zHTTP methods and descriptions

Methods from the following RFCs are all observed:

    * RFC 9110: HTTP Semantics, obsoletes 7231, which obsoleted 2616
    * RFC 5789: PATCH Method for HTTP
c                 H    [         R                  X5      nXl        X#l        U$ r   )strr   r   r   )r   r   r   r   s       r   r   HTTPMethod.__new__   s    kk#%%
r   c                 T    SU R                   R                  < SU R                  < S3$ )N<.>)	__class__rJ   _name_r   s    r   __repr__HTTPMethod.__repr__   s     NN33T[[AAr   )CONNECTz%Establish a connection to the server.)DELETEzRemove the target.)GETzRetrieve the target.)HEADzBSame as GET, but only retrieve the status line and header section.)OPTIONSz2Describe the communication options for the target.)PATCHz(Apply partial modifications to a target.)POSTz<Perform target-specific processing with the request payload.)PUTz,Replace the target with the request payload.)TRACEz>Perform a message loop-back test along the path to the target.r   N)rJ   rK   rL   rM   rN   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      sB    B AG+F
'CWDMG?EQD
?CUEr   N)enumr   r   r   __all__r   r   r   r   r   <module>r      s[    / /
& gfC fC fCR gV V Vr   