line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Paws::Net::APIRequest; |
2
|
20
|
|
|
20
|
|
123
|
use Moose; |
|
20
|
|
|
|
|
43
|
|
|
20
|
|
|
|
|
122
|
|
3
|
20
|
|
|
20
|
|
127126
|
use HTTP::Headers; |
|
20
|
|
|
|
|
118432
|
|
|
20
|
|
|
|
|
654
|
|
4
|
20
|
|
|
20
|
|
6022
|
use URI; |
|
20
|
|
|
|
|
62501
|
|
|
20
|
|
|
|
|
3826
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has parameters => (is => 'rw', isa => 'HashRef', default => sub { {} }); |
7
|
|
|
|
|
|
|
has headers => (is => 'rw', isa => 'HTTP::Headers', default => sub { HTTP::Headers->new }); |
8
|
|
|
|
|
|
|
has content => (is => 'rw', isa => 'Str|Undef'); |
9
|
|
|
|
|
|
|
has method => (is => 'rw', isa => 'Str'); |
10
|
|
|
|
|
|
|
has uri => (is => 'rw', isa => 'Str'); |
11
|
|
|
|
|
|
|
has url => (is => 'rw', isa => 'Str'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub header { |
14
|
1047
|
|
|
1047
|
0
|
49153
|
my ($self, $header, $value) = @_; |
15
|
1047
|
100
|
|
|
|
8183
|
$self->headers->header($header, $value) if (defined $value); |
16
|
1047
|
|
|
|
|
34337
|
return $self->headers->header($header); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub header_hash { |
20
|
20
|
|
|
20
|
0
|
35
|
my $self = shift; |
21
|
20
|
|
|
|
|
42
|
my $headers = {}; |
22
|
20
|
|
|
120
|
|
447
|
$self->headers->scan(sub { $headers->{ $_[0] } = $_[1] }); |
|
120
|
|
|
|
|
1390
|
|
23
|
20
|
|
|
|
|
132
|
return $headers; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
1; |