view release on metacpan or search on metacpan
lib/AnyEvent/Net/Amazon/S3/HTTPRequest.pm view on Meta::CPAN
package AnyEvent::Net::Amazon::S3::HTTPRequest;
# ABSTRACT: Create a signed HTTP::Request
our $VERSION = 'v0.04.0.80'; # VERSION
use strict;
use warnings;
use Module::AnyEvent::Helper::Filter -as => __PACKAGE__,
-target => substr(__PACKAGE__, 10),
-transformer => 'Net::Amazon::S3';
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Net::Amazon::S3::HTTPRequest - Create a signed HTTP::Request
=head1 VERSION
version v0.04.0.80
=head1 SYNOPSIS
my $http_request = AnyEvent::Net::Amazon::S3::HTTPRequest->new(
s3 => $self->s3,
method => 'PUT',
path => $self->bucket . '/',
headers => $headers,
content => $content,
)->http_request;
=head1 DESCRIPTION
This module creates an HTTP::Request object that is signed
appropriately for Amazon S3,
and the same as L<Net::Amazon::S3::HTTPRequest>,
except for its name.
=head1 METHODS
=head2 http_request
This method creates, signs and returns a HTTP::Request object.
=head2 query_string_authentication_uri
This method creates, signs and returns a query string authentication
URI.
=for test_synopsis no strict 'vars';
=head1 AUTHOR
lib/AnyEvent/Net/Amazon/S3/Request/AbortMultipartUpload.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::AbortMultipartUpload>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/CompleteMultipartUpload.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::CompleteMultipartUpload>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/CreateBucket.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::CreateBucket>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/DeleteBucket.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::DeleteBucket>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/DeleteMultiObject.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::DeleteMultiObject>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/DeleteMultipleObjects.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::DeleteMultipleObjects>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/DeleteObject.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::DeleteObject>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/GetBucketAccessControl.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::GetBucketAccessControl>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/GetBucketLocationConstraint.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::GetBucketLocationConstraint>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/GetObject.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::GetObject>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head2 query_string_authentication_uri
This method returns query string authentication URI.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
lib/AnyEvent/Net/Amazon/S3/Request/GetObjectAccessControl.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::GetObjectAccessControl>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/InitiateMultipartUpload.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::InitiateMultipartUpload>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/ListAllMyBuckets.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::ListAllMyBuckets>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/ListBucket.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::ListBucket>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/ListParts.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::ListParts>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/PutObject.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::PutObject>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/PutPart.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::PutPart>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/SetBucketAccessControl.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::SetBucketAccessControl>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
lib/AnyEvent/Net/Amazon/S3/Request/SetObjectAccessControl.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is the same as L<Net::Amazon::S3::Request::SetObjectAccessControl>, except for its name.
=for test_synopsis no strict 'vars';
=head1 METHODS
=head2 http_request
This method returns a HTTP::Request object.
=head1 AUTHOR
Yasutaka ATARASHI <yakex@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under
is_deeply( $response->{keys}, [] );
ok( $bucket_obj->delete_bucket() );
}
# see more docs in AnyEvent::Net::Amazon::S3::Bucket
# local test methods
sub is_request_response_code {
my ( $url, $code, $message ) = @_;
my $request = HTTP::Request->new( 'GET', $url );
#warn $request->as_string();
my $response = $s3->ua->request($request);
is( $response->code, $code, $message );
}
sub like_acl_allusers_read {
my ( $bucketobj, $keyname ) = @_;
my $message = acl_allusers_read_message( 'like', @_ );
like( $bucketobj->get_acl($keyname), qr(AllUsers.+READ), $message );