HTTP::Tinyish(3)
πΈ NAME πΈ
HTTP::Tinyish(3) β from the User Contributed Perl Documentation β is the manual page for HTTP::Tinyish: HTTP::Tiny compatible HTTP client wrappers. Okay so it's a wrapper situation, and it's giving βHTTP::Tiny API, but make it flexible.β π
β¨ SYNOPSIS β¨
Bestie, the whole plan is right here:
my $http = HTTP::Tinyish->new(agent => "Mozilla/4.0");
my $res = $http->get("http://www.cpan.org/");
warn $res->{status};
$http->post("http://example.com/post", {
headers => { "Content-Type" => "application/x-www-form-urlencoded" },
content => "foo=bar&baz=quux",
});
$http->mirror("http://www.cpan.org/modules/02packages.details.txt.gz", "./02packages.details.txt.gz");
π DESCRIPTION π
Okay so HTTP::Tinyish is a wrapper module for HTTP client modules LWP, HTTP::Tiny and HTTP client software "curl" and "wget".
It provides an API compatible to HTTP::Tiny, and the implementation has been extracted out of App::cpanminus. This module can be useful in a restrictive environment where you need to be able to download CPAN modules without an HTTPS support in built-in HTTP library. Restrictive env? Handled. π«Ά
π BACKEND SELECTION π
Backends are searched in the order of: LWP, HTTP::Tiny, "curl" and "wget". HTTP::Tinyish will auto-detect if the backend also supports HTTPS, and use the appropriate backend based on the given URL to the request methods.
For example, if you only have HTTP::Tiny but without SSL related modules, it is possible that:
my $http = HTTP::Tinyish->new;
$http->get("http://example.com"); # uses HTTP::Tiny
$http->get("https://example.com"); # uses curl
π«Ά COMPATIBILITIES π«Ά
All request related methods such as get, post, put, delete, request, patch and mirror are supported. That's the whole roster, bestie. β¨
π§ LWP
LWPbackend requiresLWP 5.802or over to be functional, andLWP::Protocol::httpsto send HTTPS requests.- The
mirrormethod doesn't consider third options hash into account (i.e. you can't override the HTTP headers). proxyis automatically detected from environment variables.timeout,max_redirect,agent,default_headersandverify_SSLare translated.
π£ HTTP::Tiny
- Because the actual
HTTP::Tinybackend is used, all APIs are supported. No notes.
π Curl
- This module has been tested with
curl 7.22and later. - HTTPS support is automatically detected by running
curl --versionand see its protocol output. timeout,max_redirect,agent,default_headersandverify_SSLare supported.
π¦ Wget
- This module requires
Wget 1.12and later. Wgetprior to1.15doesn't support sending custom HTTP methods, so if you use$http->putfor example, you'll get an internal error response (599). Not the 599 π- HTTPS support is automatically detected.
mirror()method doesn't sendIf-Modified-Sinceheader to the server, which will result in full-download every time becausewgetdoesn't support--timestampingcombined with-Ooption.timeout,max_redirect,agent,default_headersandverify_SSLare supported.
π SIMILAR MODULES π
File::Fetchβ is core since5.10. Has support for non-HTTP protocols such asftpandgit. Does not support HTTPS or basic authentication as of this writing.Plientβ provides more complete runtime API, but seems only compatible on Unix environments. Does not supportmirror()method.
π AUTHOR π
Tatsuhiko Miyagawa
Β©οΈ COPYRIGHT Β©οΈ
Tatsuhiko Miyagawa, 2015-
π LICENSE π
This module is licensed under the same terms as Perl itself.
Okay bestie, that's the whole HTTP::Tinyish tea. This page came from perl v5.42.0, dated 2024-03-22. Slay. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-HTTP-Tinyish 0.190.0-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms