.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::Amazon::S3::Response 3pm" .TH Net::Amazon::S3::Response 3pm "2020-10-09" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Amazon::S3::Response .SH "VERSION" .IX Header "VERSION" version 0.97 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& package Command::Response; \& extends \*(AqNet::Amazon::S3::Response\*(Aq; \& \& ... \& my $response = Command::Response\->new ( \& http_response => $http_response, \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Response handler base class providing functionality common to most S3 responses. .SH "EXTENDING" .IX Header "EXTENDING" Net::Amazon::S3::Response provides methods to cache response data. .IP "_data" 4 .IX Item "_data" Read-only accessor initialized by \f(CW\*(C`_build_data\*(C'\fR .IP "_build_data" 4 .IX Item "_build_data" Data builder, by default calls \f(CW\*(C`_parse_data\*(C'\fR if response is success and provides valid \s-1XML\s0 document. .IP "_parse_data" 4 .IX Item "_parse_data" Abstract (undefined in parent) method to be implemented by children. .SH "METHODS" .IX Header "METHODS" .SS "Constructor" .IX Subsection "Constructor" Constructor accepts only one (required) parameter \- \f(CW\*(C`http_response\*(C'\fR. It should act like HTTP::Response. .SS "Response classification methods" .IX Subsection "Response classification methods" .IP "is_success" 4 .IX Item "is_success" True if response is a success response, false otherwise. .Sp Successful response may contain invalid \s-1XML.\s0 .IP "is_redirect" 4 .IX Item "is_redirect" True if response is a redirect. .IP "is_error" 4 .IX Item "is_error" True if response is an error response, false otherwise. .Sp Response is considered to be an error either when response code is an \s-1HTTP\s0 error (4xx or 5xx) or response content is an error \s-1XML\s0 document. .Sp See also \*(L"S3 Error Response\*(R" for more details. .IP "is_internal_response" 4 .IX Item "is_internal_response" True if response is generated by user agent itself (eg: Cannot connect) .IP "is_xml_content" 4 .IX Item "is_xml_content" True if response data is a valid \s-1XML\s0 document .SS "Error handling" .IX Subsection "Error handling" Apart error classifition Net::Amazon::S3::Response provides also common error data accessors. .PP Error data are available only in case of error response. .IP "error_code" 4 .IX Item "error_code" Either content of \f(CW\*(C`Error/Code\*(C'\fR \s-1XML\s0 element or \s-1HTTP\s0 response code. .IP "error_message" 4 .IX Item "error_message" Either content of \f(CW\*(C`Error/Message\*(C'\fR \s-1XML\s0 element or \s-1HTTP\s0 response message. .IP "error_request_id" 4 .IX Item "error_request_id" Content of \f(CW\*(C`Error/RequestId\*(C'\fR \s-1XML\s0 element if available, \f(CW\*(C`x\-amz\-request\-id\*(C'\fR header if available, empty list otherwise. .IP "error_resource" 4 .IX Item "error_resource" Content of c if available, request uri otherwise. .SS "Common Response Headers" .IX Subsection "Common Response Headers" See \*(L"S3 Common Response Headers\*(R" for more details. .IP "content_length" 4 .IX Item "content_length" .PD 0 .IP "content_type" 4 .IX Item "content_type" .IP "connection" 4 .IX Item "connection" .IP "etag" 4 .IX Item "etag" .PD ETag with trimmed leading/trailing quotes. .IP "server" 4 .IX Item "server" .PD 0 .IP "delete_marker" 4 .IX Item "delete_marker" .IP "request_id" 4 .IX Item "request_id" .IP "id_2" 4 .IX Item "id_2" .IP "version_id" 4 .IX Item "version_id" .PD .SS "\s-1XML\s0 Document parsing" .IX Subsection "XML Document parsing" .IP "xml_document" 4 .IX Item "xml_document" Lazy built instance of XML::LibXML. .Sp Available only if response is \s-1XML\s0 response and contains valid \s-1XML\s0 document. .IP "xpath_context" 4 .IX Item "xpath_context" Lazy built instance of XML::LibXML::XPathContext. .Sp Available only if response is \s-1XML\s0 response and contains valid \s-1XML\s0 document .SS "\s-1HTTP\s0 Response methods" .IX Subsection "HTTP Response methods" Further methods delegated to \f(CW\*(C`http_response\*(C'\fR. Refer HTTP::Response for description. .IP "code" 4 .IX Item "code" .PD 0 .IP "message" 4 .IX Item "message" .IP "status_line" 4 .IX Item "status_line" .IP "content" 4 .IX Item "content" .IP "decoded_content" 4 .IX Item "decoded_content" .IP "header" 4 .IX Item "header" .IP "headers" 4 .IX Item "headers" .IP "header_field_names" 4 .IX Item "header_field_names" .PD .SH "AUTHOR" .IX Header "AUTHOR" Branislav Zahradník .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This module is part of Net::Amazon::S3. .SH "AUTHOR" .IX Header "AUTHOR" Branislav Zahradník .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2020 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.