1Net::Amazon::S3::ResponUssee(r3)Contributed Perl DocumenNteatt:i:oAnmazon::S3::Response(3)
2
3
4

NAME

6       Net::Amazon::S3::Response
7

VERSION

9       version 0.98
10

SYNOPSIS

12               package Command::Response;
13               extends 'Net::Amazon::S3::Response';
14
15               ...
16               my $response = Command::Response->new (
17                       http_response => $http_response,
18               );
19

DESCRIPTION

21       Response handler base class providing functionality common to most S3
22       responses.
23

EXTENDING

25       Net::Amazon::S3::Response provides methods to cache response data.
26
27       _data
28           Read-only accessor initialized by "_build_data"
29
30       _build_data
31           Data builder, by default calls "_parse_data" if response is success
32           and provides valid XML document.
33
34       _parse_data
35           Abstract (undefined in parent) method to be implemented by
36           children.
37

METHODS

39   Constructor
40       Constructor accepts only one (required) parameter - "http_response".
41       It should act like HTTP::Response.
42
43   Response classification methods
44       is_success
45           True if response is a success response, false otherwise.
46
47           Successful response may contain invalid XML.
48
49       is_redirect
50           True if response is a redirect.
51
52       is_error
53           True if response is an error response, false otherwise.
54
55           Response is considered to be an error either when response code is
56           an HTTP error (4xx or 5xx) or response content is an error XML
57           document.
58
59           See also "S3 Error Response"
60           <https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html>
61           for more details.
62
63       is_internal_response
64           True if response is generated by user agent itself (eg: Cannot
65           connect)
66
67       is_xml_content
68           True if response data is a valid XML document
69
70   Error handling
71       Apart error classifition Net::Amazon::S3::Response provides also common
72       error data accessors.
73
74       Error data are available only in case of error response.
75
76       error_code
77           Either content of "Error/Code" XML element or HTTP response code.
78
79       error_message
80           Either content of "Error/Message" XML element or HTTP response
81           message.
82
83       error_request_id
84           Content of "Error/RequestId" XML element if available,
85           "x-amz-request-id" header if available, empty list otherwise.
86
87       error_resource
88           Content of c<Error/Resource> if available, request uri otherwise.
89
90   Common Response Headers
91       See "S3 Common Response Headers"
92       <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html>
93       for more details.
94
95       content_length
96       content_type
97       connection
98       etag
99           ETag with trimmed leading/trailing quotes.
100
101       server
102       delete_marker
103       request_id
104       id_2
105       version_id
106
107   XML Document parsing
108       xml_document
109           Lazy built instance of XML::LibXML.
110
111           Available only if response is XML response and contains valid XML
112           document.
113
114       xpath_context
115           Lazy built instance of XML::LibXML::XPathContext.
116
117           Available only if response is XML response and contains valid XML
118           document
119
120   HTTP Response methods
121       Further methods delegated to "http_response".  Refer HTTP::Response for
122       description.
123
124       code
125       message
126       status_line
127       content
128       decoded_content
129       header
130       headers
131       header_field_names
132

AUTHOR

134       Branislav Zahradník <barney@cpan.org>
135
137       This module is part of Net::Amazon::S3.
138

AUTHOR

140       Branislav Zahradník <barney@cpan.org>
141
143       This software is copyright (c) 2021 by Amazon Digital Services, Leon
144       Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav
145       Zahradník.
146
147       This is free software; you can redistribute it and/or modify it under
148       the same terms as the Perl 5 programming language system itself.
149
150
151
152perl v5.34.0                      2021-07-22      Net::Amazon::S3::Response(3)
Impressum