View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Tatsuhiko Miyagawa > HTTP-Tinyish-0.12 > HTTP::Tinyish

Download:
HTTP-Tinyish-0.12.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.12   Source   Latest Release: HTTP-Tinyish-0.14

NAME ^

HTTP::Tinyish - HTTP::Tiny compatible HTTP client wrappers

SYNOPSIS ^

  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 ^

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.

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 and mirror are supported.

LWP

HTTP::Tiny

Because the actual HTTP::Tiny backend is used, all APIs are supported.

Curl

Wget

SIMILAR MODULES ^

AUTHOR ^

Tatsuhiko Miyagawa

COPYRIGHT ^

Tatsuhiko Miyagawa, 2015-

LICENSE ^

This module is licensed under the same terms as Perl itself.

syntax highlighting: