line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
796
|
use v5.10.0; |
|
1
|
|
|
|
|
5
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
52
|
|
3
|
|
|
|
|
|
|
package JMAP::Tester::Role::HTTPResult 0.101; |
4
|
|
|
|
|
|
|
# ABSTRACT: the kind of thing that you get back for an http request |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use Moo::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'JMAP::Tester::Role::Result'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#pod =head1 OVERVIEW |
11
|
|
|
|
|
|
|
#pod |
12
|
|
|
|
|
|
|
#pod This is the role consumed by the class of any object returned by |
13
|
|
|
|
|
|
|
#pod L's C method. In addition to |
14
|
|
|
|
|
|
|
#pod L, this role provides C to |
15
|
|
|
|
|
|
|
#pod get at the underlying L object. C will |
16
|
|
|
|
|
|
|
#pod come from the C method of that object. |
17
|
|
|
|
|
|
|
#pod |
18
|
|
|
|
|
|
|
#pod =cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has http_response => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#pod =method response_payload |
25
|
|
|
|
|
|
|
#pod |
26
|
|
|
|
|
|
|
#pod Returns the raw payload of the response, if there is one. Empty string |
27
|
|
|
|
|
|
|
#pod otherwise. Mostly this will be C<< $self->http_response->as_string >> |
28
|
|
|
|
|
|
|
#pod but other result types may exist that don't have an http_response... |
29
|
|
|
|
|
|
|
#pod |
30
|
|
|
|
|
|
|
#pod =cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub response_payload { |
33
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
|
|
|
return $self->http_response ? $self->http_response->as_string : ''; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |