| 1 | package Paws::Net::APIRequest; | ||||||||||
| 2 | 32 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 32 | ▶ | use HTTP::Headers; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 32 | ▶ | use URI; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 434 | ▶ | has parameters => (is => 'rw', isa => 'HashRef', default => sub { {} }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 434 | ▶ | has headers => (is => 'rw', isa => 'HTTP::Headers', default => sub { HTTP::Headers->new }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 32 | has content => (is => 'rw', isa => 'Str|Undef', default => ''); | |||||||||
| 9 | 32 | has method => (is => 'rw', isa => 'Str'); | |||||||||
| 10 | 32 | has uri => (is => 'rw', isa => 'Str'); | |||||||||
| 11 | 32 | has url => (is => 'rw', isa => 'Str'); | |||||||||
| 12 | |||||||||||
| 13 | 5654 | ▶ | sub header { | ||||||||
|
Subroutine
header: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 14 | 5654 | my ($self, $header, $value) = @_; | |||||||||
| 15 | 5654 | ▶ | $self->headers->header($header, $value) if (defined $value); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 5654 | return $self->headers->header($header); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 20 | ▶ | sub header_hash { | ||||||||
|
Subroutine
header_hash: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 20 | my $self = shift; | |||||||||
| 21 | 20 | my $headers = {}; | |||||||||
| 22 | 20 | ▶ | $self->headers->scan(sub { $headers->{ $_[0] } = $_[1] }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 20 | return $headers; | |||||||||
| 24 | } | ||||||||||
| 25 | 32 | 1; | |||||||||