Net::HTTPS::Any - Simple HTTPS client using whichever underlying SSL module is available
use Net::HTTPS::Any qw(https_get https_post); ( $page, $response, %reply_headers ) = https_get( { 'host' => 'www.fortify.net', 'port' => 443, 'path' => '/sslcheck.html', 'args' => { 'field' => 'value' }, #'args' => [ 'field'=>'value' ], #order preserved }, ); ( $page, $response, %reply_headers ) = https_post( 'host' => 'www.google.com', 'port' => 443, 'path' => '/accounts/ServiceLoginAuth', 'args' => { 'field' => 'value' }, #'args' => [ 'field'=>'value' ], #order preserved ); #...
This is a simple wrapper around either of the two available SSL modules. It offers a unified API for sending GET and POST requests over HTTPS and receiving responses.
It depends on Net::SSLeay _or_ ( Crypt::SSLeay and LWP::UserAgent ).
If you just want to write something that speaks HTTPS, you don't need this module. Just go ahead and use whichever of the two modules is good for you. Don't worry about it.
On the other hand, if you are a CPAN author or distribute a Perl application, especially if you aim to support multiple OSes/disributions, using this module for speaking HTTPS may make things easier on your users. It allows your code to be used with either SSL implementation.
Using LWP::Protocol::https 6.02 or later, the LWP path actually uses Net::SSLeay also instead of Crypt::SSLeay. Going forward that makes this module more of historical interest, especially so since modern LWP has its own mechanism to force use of Crypt::SSLeay: $Net::HTTPS::SSL_SOCKET_CLASS = "Net::SSL";
Therefore this module will likely eventually become a wrapper around a single codepath, driven by the conservative needs of Business::OnlinePayment::HTTPS.
Accepts parameters as either a hashref or a list of fields and values.
Parameters are:
For example: { 'X-Header1' => 'value', ... }
CGI arguments, either as a hashref or a listref. In the latter case, ordering is preserved (see Tie::IxHash to do so when passing a hashref).
Set true to enable debugging.
Returns a list consisting of the page content as a string, the HTTP response code and message (i.e. "200 OK" or "404 Not Found"), and a list of key/value pairs representing the HTTP response headers.
Defaults to "application/x-www-form-urlencoded" if not specified.
Raw content (overrides args). A simple scalar containing the raw content.
Set true to enable debugging in the underlying SSL module.
Ivan Kohler, <ivan-net-https-any at freeside.biz>
<ivan-net-https-any at freeside.biz>
Please report any bugs or feature requests to bug-net-https-any at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-HTTPS-Any. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-https-any at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::HTTPS::Any
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-HTTPS-Any
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-HTTPS-Any
CPAN Ratings
http://cpanratings.perl.org/d/Net-HTTPS-Any
Search CPAN
http://search.cpan.org/dist/Net-HTTPS-Any
Copyright 2008-2014 Freeside Internet Services, Inc. (http://freeside.biz/) All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::HTTPS::Any, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::HTTPS::Any
CPAN shell
perl -MCPAN -e shell install Net::HTTPS::Any
For more information on module installation, please visit the detailed CPAN module installation guide.