line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Paws::Net::APIRequest; |
2
|
20
|
|
|
20
|
|
120
|
use Moose; |
|
20
|
|
|
|
|
35
|
|
|
20
|
|
|
|
|
125
|
|
3
|
20
|
|
|
20
|
|
122851
|
use HTTP::Headers; |
|
20
|
|
|
|
|
116466
|
|
|
20
|
|
|
|
|
657
|
|
4
|
20
|
|
|
20
|
|
5937
|
use URI; |
|
20
|
|
|
|
|
60626
|
|
|
20
|
|
|
|
|
3783
|
|
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
|
1106
|
|
|
1106
|
0
|
52905
|
my ($self, $header, $value) = @_; |
15
|
1106
|
100
|
|
|
|
8745
|
$self->headers->header($header, $value) if (defined $value); |
16
|
1106
|
|
|
|
|
38458
|
return $self->headers->header($header); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub header_hash { |
20
|
20
|
|
|
20
|
0
|
42
|
my $self = shift; |
21
|
20
|
|
|
|
|
47
|
my $headers = {}; |
22
|
20
|
|
|
120
|
|
537
|
$self->headers->scan(sub { $headers->{ $_[0] } = $_[1] }); |
|
120
|
|
|
|
|
1447
|
|
23
|
20
|
|
|
|
|
131
|
return $headers; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
1; |