NAME

WWW::REST::Simple - Just provides two most frequently used http methods: GET and POST

SYNOPSIS

    use WWW::REST::Simple qw/get post/;

    # just GET a url
    my $content = get('http://www.example.com/?param_x=1');

    my $params = { param_x => 1, param_y => 2 };

    # GET some url like 'http://www.example.com/?param_x=1&param_y=2
    my $content = get('http://www.example.com/', $params);

    # or by POST, here we just take params as form data
    my $content = post('http://www.example.com/', $params);

EXPORTS

Exports the get and post functions, so be careful with namespace collision :(

Except for the params, you can send request with a customized headers. Both of params and headers are hash references.

get($url, $a_hash_ref_params, $a_hash_ref_headers); post($url, $a_hash_ref_params, $a_hash_ref_headers);

No other methods like DELETE, PUT etc. provided.

So if you need more powerful one, go to WWW::REST or REST::Client.

Call it Simple it's really simple ; )

AUTHOR

Bin Joy <perlxruby@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Bin Joy.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.