Skip to content

manakai/perl-web-useragent-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Web::UserAgent::Functions - Easy-to-use functions for HTTP accesses

SYNOPSIS

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',
    };

DESCRIPTION

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

DEPENDENCY

This module requires Perl 5.14.2 or later (as required by its dependencies).

This module requires LWP::UserAgent.

SEE ALSO

LWP::UserAgent. bin/tools/http.pl.

AUTHOR

Wakaba <[email protected]>.

HISTORY

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.

LICENSE

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.

Releases

No releases published

Packages

No packages published