| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Net::ACME2::HTTP::Response; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 3 |  |  | 3 |  | 20 | use strict; | 
|  | 3 |  |  |  |  | 58 |  | 
|  | 3 |  |  |  |  | 93 |  | 
| 4 | 3 |  |  | 3 |  | 16 | use warnings; | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 80 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 3 |  |  | 3 |  | 14 | use parent qw( HTTP::Tiny::UA::Response ); | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 13 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 3 |  |  | 3 |  | 4866 | use JSON          (); | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 66 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 3 |  |  | 3 |  | 17 | use Net::ACME2::X (); | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 469 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | sub die_because_unexpected { | 
| 13 | 0 |  |  | 0 | 0 | 0 | my ($self) = @_; | 
| 14 |  |  |  |  |  |  |  | 
| 15 | 0 |  |  |  |  | 0 | die Net::ACME2::X->create( | 
| 16 |  |  |  |  |  |  | 'UnexpectedResponse', | 
| 17 |  |  |  |  |  |  | { | 
| 18 |  |  |  |  |  |  | uri     => $self->url(), | 
| 19 |  |  |  |  |  |  | status  => $self->status(), | 
| 20 |  |  |  |  |  |  | reason  => $self->reason(), | 
| 21 |  |  |  |  |  |  | headers => $self->headers(), | 
| 22 |  |  |  |  |  |  | }, | 
| 23 |  |  |  |  |  |  | ); | 
| 24 |  |  |  |  |  |  | } | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | #Useful for everything but certificate issuance, apparently? | 
| 27 |  |  |  |  |  |  | sub content_struct { | 
| 28 | 30 |  |  | 30 | 0 | 104 | my ($self) = @_; | 
| 29 |  |  |  |  |  |  |  | 
| 30 | 30 |  | 33 |  |  | 459 | my $json = ($self->{'_json'} ||= JSON->new()->allow_nonref()); | 
| 31 |  |  |  |  |  |  |  | 
| 32 | 30 |  |  |  |  | 672 | return $json->decode( $self->content() ); | 
| 33 |  |  |  |  |  |  | } | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | 1; |