Net::A...esponse(3pm)

πŸ’– Net::Amazon::S3::Response πŸ’–

okay bestie, welcome to the manual page for Net::Amazon::S3::Response, which is part of the perl docs (the 3pm girlies know ✨). She's the vibe that basically every S3 response shares. Let's get into it 🫢

✨ NAME ✨

Net::Amazon::S3::Response β€” behaviour common to most S3 responses. literally the shared personality of the whole response family πŸ’…

🌸 VERSION 🌸

version 0.992 β€” she's serving a specific number, no cap

πŸ¦‹ SYNOPSIS πŸ¦‹

package Command::Response;
extends 'Net::Amazon::S3::Response';

...
my $response = Command::Response->new (
    http_response => $http_response,
);

see how she just extends it? main character energy fr fr πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So this is the response handler base class πŸŽ€ She provides all the functionality that's common to most S3 responses. Think of her as the group chat everyone else inherits their whole personality from.

🌈 EXTENDING 🌈

Net::Amazon::S3::Response provides methods to cache response data. caching is self care, periodt πŸ’–

  • _data β€” read-only accessor, initialized by _build_data.
  • _build_data β€” the data builder πŸ’… By default she calls _parse_data if the response is a success and provides a valid XML document.
  • _parse_data β€” abstract (undefined in the parent!) method that has to be implemented by the children. yep, the parent just leaves this one blank, it's giving "figure it out yourselves besties" πŸ™ˆ

⭐ METHODS ⭐

🧚 Constructor 🧚

The constructor accepts exactly one (required) parameter β€” http_response 🫢 It should act like HTTP::Response.

πŸŽ€ Response classification methods πŸŽ€

  • is_success β€” true if the response is a success response, false otherwise. ⚠️ heads up: a successful response may contain invalid XML. yes queen, she's messy like that.
  • is_redirect β€” true if the response is a redirect.
  • is_error β€” true if the response is an error response, false otherwise. A response counts as an error either when the response code is an HTTP error (4xx or 5xx) or when the response content is an error XML document.

See also "S3 Error Response" <https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html> for more details.

  • is_internal_response β€” true if the response was generated by the user agent itself (eg: Cannot connect).
  • is_xml_content β€” true if the response data is a valid XML document.

πŸ’€ Error handling πŸ’€

Apart from error classification, Net::Amazon::S3::Response also provides common error data accessors.

bestie, listen: error data are available only in case of an error response. no error, no data. that's the rule πŸ’…
  • error_code β€” either the content of the Error/Code XML element, or the HTTP response code.
  • error_message β€” either the content of the Error/Message XML element, or the HTTP response message.
  • error_request_id β€” the content of the Error/RequestId XML element if available, the x-amz-request-id header if available, empty list otherwise.
  • error_resource β€” the content of c<Error/Resource> if available, the request uri otherwise.

πŸ“ Common Response Headers πŸ“

See "S3 Common Response Headers" <https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html> for more details.

  • content_length
  • content_type
  • connection
  • etag β€” ETag with trimmed leading/trailing quotes. she's clean like that ✨
  • server
  • delete_marker
  • request_id
  • id_2
  • version_id

πŸ”₯ XML Document parsing πŸ”₯

  • xml_document β€” lazy built instance of XML::LibXML. Available only if the response is an XML response and contains a valid XML document.
  • xpath_context β€” lazy built instance of XML::LibXML::XPathContext. Available only if the response is an XML response and contains a valid XML document.

🌸 HTTP Response methods 🌸

Further methods are delegated to http_response. Refer to HTTP::Response for a description. iykyk 😌

  • code
  • message
  • status_line
  • content
  • decoded_content
  • header
  • headers
  • header_field_names

πŸ‘‘ AUTHOR πŸ‘‘

Branislav ZahradnΓ­k <barney@cpan.org>

This module is part of Net::Amazon::S3.

πŸ‘‘ AUTHOR πŸ‘‘

Branislav ZahradnΓ­k <barney@cpan.org>

This software is copyright (c) 2025 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav ZahradnΓ­k.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page bestie, no notes, absolute slay βœ¨πŸ’…πŸ¦‹

cute lil sign-off: this was perl v5.40.1, dated 2025-12-07, and it's the Net::Amazon::S3::Response page β€” mwah πŸ’– go forth and parse some XML responsibly πŸŽ€

πŸ“¦ where this page comes from