LWP::Simple::REST - A simple procedural interface to HTTP verbs in Perl.
A simple procedural interface to HTTP verbs.
You can use it to request any links that you want, like RESTful APIs requests.
For example:
To receive a json response and decode it:
my $response = http_get( 'https://current.trovebox.com/photos/list.json' );
my $decoded_json = decode_json( $response );
Or just use the method that returns the decoded json:
my $decoded_json = json_get( 'https://current.trovebox.com/photos/list.json' );
Link for the module:
https://github.com/ItaloGoncales/LWP-Simple-REST
Or on CPAN:
https://metacpan.org/pod/LWP::Simple::REST
Written by Italo Gonçales
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors

janosgyerik
25.21K

Jean-Remy Duboc
12.28K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#