-
-
13 Dec 2013 04:36:29 UTC
- Distribution: WWW-Curl-Simple
- Module version: 0.100191
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (661 / 0 / 0)
- Kwalitee
Bus factor: 0- 50.00% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (21.57KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
WWW::Curl::Simple - A Simpler interface to WWW::Curl
VERSION
version 0.100191
SYNOPSIS
my $curl = WWW::Curl::Simple->new(); my $res = $curl->get('http://www.google.com/');
ATTRIBUTES
timeout / timeout_ms
Sets the timeout of individual requests, in seconds or milliseconds.
max_redirects
Sets the maximum number of redirects that should be transparently followed. Set this to 0 if you don't want to follow redirects. Default: 5.
check_ssl_certs
Specifies whether the underlying Curl library should check SSL certificates when making https requests. Defaults to 1 (i.e. do check certs, to err on safe side).
ssl_cert_bundle
Specifies the bundle to look for CA certificates in. Leave blank for system default, which should work if your libcurl is properly compiled.
connection_timeout /connection_timeout_ms
Sets the timeout of the connect phase of requests, in seconds or milliseconds.
fatal
Defaults to true, but if set to false, it will make failure in multi-requests warn instead of die.
METHODS
request($req)
$req
should be a HTTP::Request object.If you have a URI string or object, look at the
get
method instead. Returns a WWW::Curl::Simple::Request object.get($uri || URI)
Accepts one parameter, which should be a reference to a URI object or a string representing a URI. Returns a HTTP::Response object.
post($uri || URI, $form)
Creates a HTTP::Request of type POST to
$uri
, which can be a string or a URI object, and sets the form of the request to$form
. See HTTP::Request for more information on the format of$form
.add_request($req)
Adds
$req
(a HTTP::Request object) to the list of URLs to fetch. Returns a WWW::Curl::Simple::Request object.register($req)
An alias for
add_request
.has_request $request
Will return true if
$request
is one of the object's requests.delete_request $req
Removes
$req
from the object's list of requests.perform
Does all the requests added with
add_request
and returns a list of WWW::Curl::Simple::Request objects.wait
This method is here to provide an easier transition from LWP::Parallel::UserAgent. It is by no means a drop in replacement, but using
wait
instead ofperform
makes the return value more like that of LWP::UA.AUTHOR
Andreas Marienborg <andremar@cpan.org>
CONTRIBUTORS
Bjørn-Olav Strand <bo@startsiden.no>
Graham Knop <haarg@haarg.org>
Marcus Ramberg <marcus@nordaaker.com>
Neil Bowers <neil@bowers.com>
chromatic <chromatic@wgz.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Andreas Marienborg.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install WWW::Curl::Simple, copy and paste the appropriate command in to your terminal.
cpanm WWW::Curl::Simple
perl -MCPAN -e shell install WWW::Curl::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.