Web::UserAgent::Functions - Easy-to-use functions for HTTP accesses
use Web::UserAgent::Functions qw(http_get http_post);
my ($req, $res) = http_get
url => q<http://www.example.com/>,
params => {
foo => 'bar',
};
my ($req, $res) = http_post
url => q<http://www.example.com/>,
header_fields => {
'X-Header-Field' => 'value',
},
params => {
foo => 'bar',
};
USE OF THIS MODULE IS DEPRECATED in favor of Web::Transport::BasicClient module in the perl-web-resource repository <https://github.com/manakai/perl-web-resource/>.
This module provides three functions for HTTP access: http_get
, http_post
, and http_post_data
. They are in fact wrappers for LWP::UserAgent. They accept parameters that describes which resource is how retrieved and return HTTP::Request and HTTP::Response objects of the HTTP access.
It adds following features to the original LWP::UserAgent module:
- - Useful functional interfaces
- - Avoiding use of SOCKS proxy transparently using LWP::UserAgent::Curl module
- -
application/x-www-form-urlencoded
support - - OAuth 1.0 support
This module requires Perl 5.14.2 or later (as required by its dependencies).
This module requires LWP::UserAgent.
LWP::UserAgent. bin/tools/http.pl
.
Wakaba <[email protected]>.
This Git repository was located at <https://github.com/wakaba/perl-web-useragent-functions>.
It was transferred to the manakai project on 22 June 2022.
Copyright 2009-2013 Hatena <http://www.hatena.ne.jp/>.
Copyright 2014-2022 Wakaba <[email protected]>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.