27 Jul 2017 06:14:00 UTC
- Distribution: Net-HTTP-Tiny
- Module version: 0.002
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (1016 / 0 / 1)
- KwaliteeBus factor: 1
- 14.29% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (10.15KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionZEFRAM Andrew Main (Zefram)
Net::HTTP::Tiny - minimal HTTP client
use Net::HTTP::Tiny qw(http_get); $dat = http_get("http://maia.usno.navy.mil/ser7/tai-utc.dat");
This module provides an easy interface to retrieve files using the HTTP protocol. The location of a file to retrieve is specified using a URL. The module conforms to HTTP/1.1, and follows redirections (up to a limit of five chained redirections). Content-MD5 is checked, if the optional module Digest::MD5 is installed. IPv6 is supported, if the optional module IO::Socket::IP is installed. Only retrieval is supported, not posting or anything more exotic.
URL must be a URL using the
httpscheme. The file that it refers to is retrieved from the HTTP server, and its content is returned in the form of a string of octets. If any error occurs then the function
dies. Possible errors include the URL being malformed, inability to contact the HTTP server, and the HTTP server reporting that the file doesn't exist.
IPv6 support is largely untested. Reports of experiences with it would be appreciated.
Andrew Main (Zefram) <email@example.com>
Copyright (C) 2012, 2017 Andrew Main (Zefram) <firstname.lastname@example.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Net::HTTP::Tiny, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Net::HTTP::Tiny
For more information on module installation, please visit the detailed CPAN module installation guide.