WebService::XING::Response - XING API Response Class
Most methods of WebService::XING return object instances of the WebService::XING::Response class, that contains HTTP status and header information besides the actual response.
WebService::XING::Response
A WebService::XING::Response object is overloaded with the follwing behaviour:
say $response; # => "200 OK"
The HTTP status message ("code" . " " . "message"). Calls "as_string" behind the curtain.
say "created" if $response == 201;
The HTTP status "code".
$res = $xing->get_user_details or die $res;
Is true for "code" < 400, otherwise false. Calls "is_success" behind the curtain.
true
false
3-digit HTTP status code.
A human readable message, but not intended to be displayed to the user.
A HTTP::Headers object. Never rely on this item, it is virtually only useful for debugging.
The (decoded) content.
say $response->as_string; # => "200 OK"
The HTTP status message ("code" . " " . "message").
$res->is_success or die $res->as_string;
Is true for "code" < 400, otherwise false.
To install WebService::XING, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::XING
CPAN shell
perl -MCPAN -e shell install WebService::XING
For more information on module installation, please visit the detailed CPAN module installation guide.