# Net::HTTPS::Any - perldoc - [phpMan]

## NAME
    [Net::HTTPS::Any](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AHTTPS%3A%3AAny/markdown) - Simple HTTPS client

## SYNOPSIS
      use [Net::HTTPS::Any](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AHTTPS%3A%3AAny/markdown) 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
                      );

      #...

## DESCRIPTION
    This is a wrapper around [Net::SSLeay](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ASSLeay/markdown) providing a simple interface for the use of
    [Business::OnlinePayment](https://www.chedong.com/phpMan.php/perldoc/Business%3A%3AOnlinePayment/markdown).

    It used to allow switching between [Net::SSLeay](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ASSLeay/markdown) and [Crypt::SSLeay](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ASSLeay/markdown) implementations, but that was
    obsoleted. If you need to do that, use LWP instead. You can set $[Net::HTTPS::SSL_SOCKET_CLASS](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AHTTPS%3A%3ASSLSOCKETCLASS/markdown) =
    "[Net::SSL](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ASSL/markdown)" for [Crypt::SSLeay](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ASSLeay/markdown) instead of the default [Net::SSLeay](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ASSLeay/markdown) (since 6.02).

## FUNCTIONS
  https_get HASHREF | FIELD => VALUE, ...
    Accepts parameters as either a hashref or a list of fields and values.

    Parameters are:

    host
    port
    path
    headers (hashref)
        For example: { 'X-Header1' => 'value', ... }

    args
        CGI arguments, either as a hashref or a listref. In the latter case, ordering is preserved
        (see [Tie::IxHash](https://www.chedong.com/phpMan.php/perldoc/Tie%3A%3AIxHash/markdown) to do so when passing a hashref).

    debug
        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.

  https_post HASHREF | FIELD => VALUE, ...
    Accepts parameters as either a hashref or a list of fields and values.

    Parameters are:

    host
    port
    path
    headers (hashref)
        For example: { 'X-Header1' => 'value', ... }

    Content-Type
        Defaults to "application/x-www-form-urlencoded" if not specified.

    args
        CGI arguments, either as a hashref or a listref. In the latter case, ordering is preserved
        (see [Tie::IxHash](https://www.chedong.com/phpMan.php/perldoc/Tie%3A%3AIxHash/markdown) to do so when passing a hashref).

    content
        Raw content (overrides args). A simple scalar containing the raw content.

    debug
        Set true to enable debugging in the underlying SSL module.

    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.

## AUTHOR
    Ivan Kohler, "<ivan-net-https-any at freeside.biz>"

## BUGS
    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.

## SUPPORT
    You can find documentation for this module with the perldoc command.

        perldoc [Net::HTTPS::Any](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3AHTTPS%3A%3AAny/markdown)

    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 & LICENSE
    Copyright 2008-2016 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.

