Manual Pages for UNIX Darwin command on man HTTP::Status
MyWebUniversity

Manual Pages for UNIX Darwin command on man HTTP::Status

HTTP::Status(3) User Contributed Perl Documentation HTTP::Status(3)

NAME

HTTP::Status - HTTP Status code processing

SYNOPSIS

use HTTP::Status;

if ($rc != RCOK) {

print statusmessage($rc), "\n";

}

if (issuccess($rc)) { ... }

if (iserror($rc)) { ... }

if (isredirect($rc)) { ... }

DESCRIPTION

HTTP::Status is a library of routines for defining and classifying HTTP

status codes for libwww-perl. Status codes are used to encode the

overall outcome of a HTTP response message. Codes correspond to those defined in RFC 2616 and RFC 2518. CCOONNSSTTAANNTTSS The following constant functions can be used as mnemonic status code names: RCCONTINUE (100) RCSWITCHINGPROTOCOLS (101) RCPROCESSING (102) RCOK (200) RCCREATED (201) RCACCEPTED (202) RCNONAUTHORITATIVEINFORMATION (203) RCNOCONTENT (204) RCRESETCONTENT (205) RCPARTIALCONTENT (206) RCMULTISTATUS (207) RCMULTIPLECHOICES (300) RCMOVEDPERMANENTLY (301) RCFOUND (302) RCSEEOTHER (303) RCNOTMODIFIED (304) RCUSEPROXY (305) RCTEMPORARYREDIRECT (307) RCBADREQUEST (400) RCUNAUTHORIZED (401) RCPAYMENTREQUIRED (402) RCFORBIDDEN (403) RCNOTFOUND (404) RCMETHODNOTALLOWED (405) RCNOTACCEPTABLE (406) RCPROXYAUTHENTICATIONREQUIRED (407) RCREQUESTTIMEOUT (408) RCCONFLICT (409) RCGONE (410) RCLENGTHREQUIRED (411) RCPRECONDITIONFAILED (412) RCREQUESTENTITYTOOLARGE (413) RCREQUESTURITOOLARGE (414) RCUNSUPPORTEDMEDIATYPE (415) RCREQUESTRANGENOTSATISFIABLE (416) RCEXPECTATIONFAILED (417) RCUNPROCESSABLEENTITY (422) RCLOCKED (423) RCFAILEDDEPENDENCY (424)

RCINTERNALSERVERERROR (500)

RCNOTIMPLEMENTED (501) RCBADGATEWAY (502) RCSERVICEUNAVAILABLE (503) RCGATEWAYTIMEOUT (504) RCHTTPVERSIONNOTSUPPORTED (505) RCINSUFFICIENTSTORAGE (507) FFUUNNCCTTIIOONNSS The following additional functions are provided. Most of them are exported by default.

statusmessage( $code )

The statusmessage() function will translate status codes to human readable strings. The string is the same as found in the constant

names above. If the $code is unknown, then "undef" is returned.

isinfo( $code )

Return TRUE if $code is an Informational status code. This class

of status code indicates a provisional response which can't have any content.

issuccess( $code )

Return TRUE if $code is a Successful status code.

isredirect( $code )

Return TRUE if $code is a Redirection status code. This class of

status code indicates that further action needs to be taken by the user agent in order to fulfill the request.

iserror( $code )

Return TRUE if $code is an Error status code. The function return

TRUE for both client error or a server error status codes.

isclienterror( $code )

Return TRUE if $code is an Client Error status code. This class of

status code is intended for cases in which the client seems to have erred. This function is nnoott exported by default.

isservererror( $code )

Return TRUE if $code is an Server Error status code. This class of

status codes is intended for cases in which the server is aware that it has erred or is incapable of performing the request. This function is nnoott exported by default.

BUGS

Wished @EXPORTOK had been used instead of @EXPORT in the beginning. Now too much is exported by default.

perl v5.8.8 2003-10-23 HTTP::Status(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™