NAME

LWP::UserAgent::JSON - a subclass of LWP::UserAgent that understands JSON

SYNOPSIS

my $user_agent = LWP::UserAgent::JSON->new;
my $request    = HTTP::Request::JSON->new(...);
my $response   = $user_agent->request($request);
# $response->isa('HTTP::Response::JSON') if we got back JSON

DESCRIPTION

This is a simple subclass of LWP::UserAgent which recognises if it gets JSON output back, and if so returns an HTTP::Response::JSON object instead of a HTTP::Response::JSON object.

simple_request

As LWP::UserAgent::simple_request, but returns a HTTP::Response:JSON object instead of a HTTP::Response object if the response is JSON.

AUTHOR

Sam Kington <skington@cpan.org>

The source code for this module is hosted on GitHub https://github.com/skington/lwp-json-tiny - this is probably the best place to look for suggestions and feedback.

COPYRIGHT

Copyright (c) 2015 Sam Kington.

LICENSE

This library is free software and may be distributed under the same terms as perl itself.