Group
Extension

Matches 1

LWP-Simple-REST ( R/RE/RECSKY/LWP-Simple-REST-0.20.tar.gz, RECSKY, 2017; MetaCPAN )
LWP-Simple-REST/lib/LWP/Simple/REST.pm ( view source; MetaCPAN )

    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

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.