XAS::Lib::Curl::HTTP - A class for the XAS environment
use HTTP::Request; use XAS::Lib::Curl::HTTP; my $response; my $request = HTTP::Request->new(GET => 'http://scm.kesteb.us/trac'); my $ua = XAS::Lib::Curl::HTTP->new(); $response = $ua->request($request); print $response->content;
This module uses libcurl as the HTTP engine to make requests from a web server.
All true/false values use 0/1 as the indicator.
This method initializes the module and takes the following parameters:
A toggle to tell curl to forbid the reuse of sockets, defaults to true.
A toggle to tell curl to follow redirects, defaults to true.
The number of redirects to follow, defaults to 3.
The timeout for the connection, defaults to 60 seconds.
The timeout for the initial connection, defaults to 300 seconds.
The authentication method to use, defaults to 'noauth'. Possible values are 'any', 'basic', 'digest', 'ntlm', 'negotiate'. If a username and password are supplied, curl defaults to 'basic'.
An optional password to use, implies a username. Wither the password is actually used, depends on -auth_method.
An optional username to use, implies a password.
An optional CA cerificate to use.
An optional password for a signed cerificate.
An optional certificate to use.
An optional key for a certificate to use.
Wither to verify the host certifcate, defaults to true.
Wither to verify the peer certificate, defaults to true.
The url of a proxy that needs to be transversed.
The authentication method to use, defaults to 'noauth'. Possible values are 'any', 'basic', 'digest', 'ntlm', 'negotiate'. If a proxy username and a proxy password are supplied, curl defaults to 'basic'.
An optional password to use, implies a username. Wither the password is actually used, depends on -proxy_auth.
This method sends the requset to the web server. The request will return a HTTP::Response object. It takes the following parameters:
A HTTP::Request object.
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (C) 2014 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS
CPAN shell
perl -MCPAN -e shell install XAS
For more information on module installation, please visit the detailed CPAN module installation guide.