Amazon-API
view release on metacpan or search on metacpan
lib/Amazon/API.pm view on Meta::CPAN
=head2 X-Amz-Target
Most of the newer AWS APIs accept a header (X-Amz-Target) in lieu of
the CGI parameter Action. Some APIs also want the version in the
target, some don't. Sparse documentation about some of the nuances of
using the REST interface directly to call AWS APIs.
We use the C<api> value as a trigger to indicate we need to set the
Action in the X-Amz-Target header. We also check to see if the
version needs to be attached to the Action value as required by some
APIs.
if ( $self->get_api ) {
if ( $self->get_version) {
$self->set_target(sprintf("%s_%s.%s", $self->get_api, $self->get_version, $self->get_action));
}
else {
$self->set_target(sprintf("%s.%s", $self->get_api, $self->get_action));
}
( run in 1.127 second using v1.01-cache-2.11-cpan-e1769b4cff6 )