NAME

UniEvent::HTTP::Error - HTTP error constants

SYNOPSIS

use UniEvent::HTTP 'http_request';

http_request({
    ...
    response_callback => sub {
        my ($req, $res, $error) = @_;
        if ($error == UniEvent::HTTP::connect_error) { ... }
        ...
    },
})

DESCRIPTION

Constants provided by this package are used to check errors in various callbacks in UniEvent::HTTP.

All errors are XS::STL::ErrorCode objects and are of category UniEvent::HTTP::error_category.

UniEvent::HTTP::connect_error->category() == UniEvent::HTTP::error_category; # true

CONSTANTS

connect_error

Http client connect error. See nested error to find out why.

no_redirect_uri

No "Location" header or no uri in redirect response

redirection_limit

follow redirection limit exceeded

unexpected_redirect

redirection response received when redirection limit was set to 0.

transfer_aborted

server closed connection before request was fully sent

server_stopping

Passed to server request callbacks showing that request was canceled because server is stopping

pipeline_canceled

Passed to server request callbacks showing that request was canceled because it was in a pipeline and connection was closed (for example, user responded with non-keep-alive response on previous request in the pipeline).

SEE ALSO

Protocol::HTTP::Error