App-MatrixTool

 view release on metacpan or  search on metacpan

lib/App/MatrixTool/HTTPClient.pm  view on Meta::CPAN


sub request_json
{
   my $self = shift;
   $self->request( @_ )->then( sub {
      my ( $response ) = @_;

      $response->content_type eq "application/json" or
         return Future->fail( "Expected an application/json response body", matrix => );

      Future->done( decode_json( $response->decoded_content ), $response );
   });
}

=head1 AUTHOR

Paul Evans <leonerd@leonerd.org.uk>

=cut

0x55AA;



( run in 0.428 second using v1.01-cache-2.11-cpan-26ccb49234f )