line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Amazon::S3::Operation::Object::Fetch::Request; |
2
|
|
|
|
|
|
|
# ABSTRACT: An internal class to get an object |
3
|
|
|
|
|
|
|
$Net::Amazon::S3::Operation::Object::Fetch::Request::VERSION = '0.99'; |
4
|
99
|
|
|
99
|
|
759
|
use Moose 0.85; |
|
99
|
|
|
|
|
2641
|
|
|
99
|
|
|
|
|
849
|
|
5
|
99
|
|
|
99
|
|
669509
|
use MooseX::StrictConstructor 0.16; |
|
99
|
|
|
|
|
2439
|
|
|
99
|
|
|
|
|
802
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'Net::Amazon::S3::Request::Object'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Net::Amazon::S3::Request::Role::HTTP::Method'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'range' |
12
|
|
|
|
|
|
|
=> is => 'ro' |
13
|
|
|
|
|
|
|
=> isa => 'Str' |
14
|
|
|
|
|
|
|
; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
override _request_headers => sub { |
17
|
|
|
|
|
|
|
my ($self) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
return ( |
20
|
|
|
|
|
|
|
super, |
21
|
|
|
|
|
|
|
(Range => $self->range) x defined $self->range, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub query_string_authentication_uri { |
28
|
8
|
|
|
8
|
1
|
64
|
my ( $self, $expires, $query_form ) = @_; |
29
|
|
|
|
|
|
|
|
30
|
8
|
|
|
|
|
56
|
my $uri = URI->new( $self->_request_path ); |
31
|
8
|
50
|
|
|
|
9808
|
$uri->query_form( %$query_form ) if $query_form; |
32
|
|
|
|
|
|
|
|
33
|
8
|
|
|
|
|
41
|
return $self->_build_signed_request( |
34
|
|
|
|
|
|
|
path => $uri->as_string, |
35
|
|
|
|
|
|
|
)->query_string_authentication_uri($expires); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=encoding UTF-8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Net::Amazon::S3::Operation::Object::Fetch::Request - An internal class to get an object |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
version 0.99 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $http_request = Net::Amazon::S3::Operation::Object::Fetch::Request->new ( |
57
|
|
|
|
|
|
|
s3 => $s3, |
58
|
|
|
|
|
|
|
bucket => $bucket, |
59
|
|
|
|
|
|
|
key => $key, |
60
|
|
|
|
|
|
|
method => 'GET', |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Implements operation L<< GetObject|https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html >>. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This module gets an object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=for test_synopsis no strict 'vars' |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 METHODS |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 http_request |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This method returns a HTTP::Request object. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 query_string_authentication_uri |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This method returns query string authentication URI. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Branislav Zahradník <barney@cpan.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
90
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |