{
    "mode": "perldoc",
    "parameter": "HTTP::Status",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/HTTP%3A%3AStatus/json",
    "generated": "2026-06-09T11:31:19Z",
    "synopsis": "use HTTP::Status qw(:constants :is statusmessage);\nif ($rc != HTTPOK) {\nprint statusmessage($rc), \"\\n\";\n}\nif (issuccess($rc)) { ... }\nif (iserror($rc)) { ... }\nif (isredirect($rc)) { ... }",
    "sections": {
        "NAME": {
            "content": "HTTP::Status - HTTP Status code processing\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 6.36\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use HTTP::Status qw(:constants :is statusmessage);\n\nif ($rc != HTTPOK) {\nprint statusmessage($rc), \"\\n\";\n}\n\nif (issuccess($rc)) { ... }\nif (iserror($rc)) { ... }\nif (isredirect($rc)) { ... }\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "*HTTP::Status* is a library of routines for defining and classifying HTTP status codes for\nlibwww-perl. Status codes are used to encode the overall outcome of an HTTP response message.\nCodes correspond to those defined in RFC 2616 and RFC 2518.\n",
            "subsections": []
        },
        "CONSTANTS": {
            "content": "The following constant functions can be used as mnemonic status code names. None of these are\nexported by default. Use the \":constants\" tag to import them all.\n\nHTTPCONTINUE                        (100)\nHTTPSWITCHINGPROTOCOLS             (101)\nHTTPPROCESSING                      (102)\nHTTPEARLYHINTS                     (103)\n\nHTTPOK                              (200)\nHTTPCREATED                         (201)\nHTTPACCEPTED                        (202)\nHTTPNONAUTHORITATIVEINFORMATION   (203)\nHTTPNOCONTENT                      (204)\nHTTPRESETCONTENT                   (205)\nHTTPPARTIALCONTENT                 (206)\nHTTPMULTISTATUS                    (207)\nHTTPALREADYREPORTED                (208)\n\nHTTPIMUSED                         (226)\n\nHTTPMULTIPLECHOICES                (300)\nHTTPMOVEDPERMANENTLY               (301)\nHTTPFOUND                           (302)\nHTTPSEEOTHER                       (303)\nHTTPNOTMODIFIED                    (304)\nHTTPUSEPROXY                       (305)\nHTTPTEMPORARYREDIRECT              (307)\nHTTPPERMANENTREDIRECT              (308)\n\nHTTPBADREQUEST                     (400)\nHTTPUNAUTHORIZED                    (401)\nHTTPPAYMENTREQUIRED                (402)\nHTTPFORBIDDEN                       (403)\nHTTPNOTFOUND                       (404)\nHTTPMETHODNOTALLOWED              (405)\nHTTPNOTACCEPTABLE                  (406)\nHTTPPROXYAUTHENTICATIONREQUIRED   (407)\nHTTPREQUESTTIMEOUT                 (408)\nHTTPCONFLICT                        (409)\nHTTPGONE                            (410)\nHTTPLENGTHREQUIRED                 (411)\nHTTPPRECONDITIONFAILED             (412)\nHTTPPAYLOADTOOLARGE               (413)\nHTTPURITOOLONG                    (414)\nHTTPUNSUPPORTEDMEDIATYPE          (415)\nHTTPRANGENOTSATISFIABLE           (416)\nHTTPEXPECTATIONFAILED              (417)\nHTTPMISDIRECTED REQUEST             (421)\nHTTPUNPROCESSABLEENTITY            (422)\nHTTPLOCKED                          (423)\nHTTPFAILEDDEPENDENCY               (424)\nHTTPTOOEARLY                       (425)\nHTTPUPGRADEREQUIRED                (426)\nHTTPPRECONDITIONREQUIRED           (428)\nHTTPTOOMANYREQUESTS               (429)\nHTTPREQUESTHEADERFIELDSTOOLARGE (431)\nHTTPUNAVAILABLEFORLEGALREASONS   (451)\n\nHTTPINTERNALSERVERERROR           (500)\nHTTPNOTIMPLEMENTED                 (501)\nHTTPBADGATEWAY                     (502)\nHTTPSERVICEUNAVAILABLE             (503)\nHTTPGATEWAYTIMEOUT                 (504)\nHTTPHTTPVERSIONNOTSUPPORTED      (505)\nHTTPVARIANTALSONEGOTIATES         (506)\nHTTPINSUFFICIENTSTORAGE            (507)\nHTTPLOOPDETECTED                   (508)\nHTTPNOTEXTENDED                    (510)\nHTTPNETWORKAUTHENTICATIONREQUIRED (511)\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "The following additional functions are provided. Most of them are exported by default. The \":is\"\nimport tag can be used to import all the classification functions.\n",
            "subsections": [
                {
                    "name": "status_message",
                    "content": "The statusmessage() function will translate status codes to human readable strings. The\nstring is the same as found in the constant names above. If the $code is not registered in\nthe list of IANA HTTP Status Codes\n<https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml> then \"undef\" is\nreturned.\n"
                },
                {
                    "name": "is_info",
                    "content": "Return TRUE if $code is an *Informational* status code (1xx). This class of status code\nindicates a provisional response which can't have any content.\n"
                },
                {
                    "name": "is_success",
                    "content": "Return TRUE if $code is a *Successful* status code (2xx).\n"
                },
                {
                    "name": "is_redirect",
                    "content": "Return TRUE if $code is a *Redirection* status code (3xx). This class of status code\nindicates that further action needs to be taken by the user agent in order to fulfill the\nrequest.\n"
                },
                {
                    "name": "is_error",
                    "content": "Return TRUE if $code is an *Error* status code (4xx or 5xx). The function returns TRUE for\nboth client and server error status codes.\n"
                },
                {
                    "name": "is_client_error",
                    "content": "Return TRUE if $code is a *Client Error* status code (4xx). This class of status code is\nintended for cases in which the client seems to have erred.\n\nThis function is not exported by default.\n"
                },
                {
                    "name": "is_server_error",
                    "content": "Return TRUE if $code is a *Server Error* status code (5xx). This class of status codes is\nintended for cases in which the server is aware that it has erred or is incapable of\nperforming the request.\n\nThis function is not exported by default.\n"
                },
                {
                    "name": "is_cacheable_by_default",
                    "content": "Return TRUE if $code indicates that a response is cacheable by default, and it can be reused\nby a cache with heuristic expiration. All other status codes are not cacheable by default.\nSee RFC 7231 - HTTP/1.1 Semantics and Content, Section 6.1. Overview of Status Codes\n<https://tools.ietf.org/html/rfc7231#section-6.1>.\n\nThis function is not exported by default.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "IANA HTTP Status Codes\n<https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>\n",
            "subsections": []
        },
        "BUGS": {
            "content": "For legacy reasons all the \"HTTP\" constants are exported by default with the prefix \"RC\". It's\nrecommended to use explicit imports and the \":constants\" tag instead of relying on this.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Gisle Aas <gisle@activestate.com>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 1994 by Gisle Aas.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
            "subsections": []
        }
    },
    "summary": "HTTP::Status - HTTP Status code processing",
    "flags": [],
    "examples": [],
    "see_also": []
}