PUT
json
plain
headers
response
http_get
http_post
http_put
http_delete
http_head
http_upload
json_get
json_post
json_put
json_head
/;
use
LWP::UserAgent;
use HTTP::Request;
use Try::Tiny;
use JSON;
our $VERSION = '0.20';
my $user_agent = "LWP::Simple::REST";
my $lwp = LWP::UserAgent->new;
my $response;
sub user_agent { $lwp->agent(
$_[0] ) }
sub response { $response }
sub plain { return ($_[0]->content ) }
sub json { return decode_json($_[0]->content ) }
sub headers { return $_[0] ? $_[0]->headers : $response->headers };
s