Net::HTTPS::Any(3pm)
β¨ Net::HTTPS::Any β¨
okay bestie, so this is Net::HTTPS::Any β a Simple HTTPS client π and yes it's a Perl module, and yes it's from the User Contributed Perl Documentation, and yes we're gonna get into it.
πΈ SYNOPSIS πΈ
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
);
#...
like. look at that. so clean. so iconic. π
π¦ DESCRIPTION π¦
So what even is this? It's a wrapper around Net::SSLeay that gives you a simple interface for the use of Business::OnlinePayment. that's the whole vibe. no cap. π₯
Now, real talk: it used to let you switch between the Net::SSLeay and Crypt::SSLeay implementations, but that got obsoleted β it's gone, bestie, it's not coming back. If you genuinely need to do that switching thing, use LWP instead. periodt.
BUT β and this is the little loophole π«Ά β you can set $Net::HTTPS::SSL_SOCKET_CLASS = "Net::SSL" to get Crypt::SSLeay instead of the default Net::SSLeay. That's been a thing since 6.02. noted. π
π FUNCTIONS π
π https_get HASHREF | FIELD => VALUE, ...
It takes parameters either as a hashref or as a list of fields and values. either one, she's flexible like that. π
The parameters are:
hostβ the host, babe.portβ the port.pathβ the path.headers(hashref) β the headers. For example:{ 'X-Header1' => 'value', ... }argsβ CGI arguments, either as a hashref or a listref. If you go with a listref, ordering is preserved (peepTie::IxHashif you wanna keep that order while passing a hashref).debugβ set it true to enable debugging. π
What does it give you back? A list, consisting of:
- the page content, as a string π
- the HTTP response code and message (i.e.
"200 OK"or"404 Not Found") - a list of key/value pairs representing the HTTP response headers
three things. gorgeous. slay. β¨
π https_post HASHREF | FIELD => VALUE, ...
Same deal β parameters as either a hashref or a list of fields and values.
The parameters are:
hostβ the host, again.portβ the port, again.pathβ the path, again.headers(hashref) β the headers. For example:{ 'X-Header1' => 'value', ... }Content-Typeβ defaults toapplication/x-www-form-urlencodedif you don't specify it. don't come for me, that's just the default. πargsβ CGI arguments, either as a hashref or a listref. listref = ordering is preserved (again, seeTie::IxHashfor doing that with a hashref).contentβ raw content, and it overridesargs. just a simple scalar holding the raw content.debugβ set it true to enable debugging in the underlying SSL module. π
And the return? Same list energy:
- the page content, as a string π
- the HTTP response code and message (i.e.
"200 OK"or"404 Not Found") - a list of key/value pairs representing the HTTP response headers
ate. no crumbs. π
π§ AUTHOR π§
Ivan Kohler, "<ivan-net-https-any at freeside.biz>" β king behavior, honestly. π
π BUGS π
Found a bug? Want a feature? Please report it 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>.
Here's the deal: he gets notified, and then you'll automatically get notified of progress on your bug as he makes changes. mutual. reciprocal. we love to see it. π«Ά
π SUPPORT π
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>
go look at all of them, bestie, that's your enrichment time π
β 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. π
okay that's the whole page, and for the cute sign-off: this was rendered by perl v5.36.0, dated 2022-11-19, and the page itself is Net::HTTPS::Any(3pm) π¦π
mwah, go ship something, iykyk π
π¦ where this page comes from
- debian bookworm: libnet-https-any-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-https-any-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-https-any-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-https-any-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-https-any-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms