Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

io::all::http(3pm) [debian man page]

IO::All::HTTP(3pm)					User Contributed Perl Documentation					IO::All::HTTP(3pm)

NAME
IO::All::LWP - Extends IO::All to HTTP URLs SYNOPSIS
use IO::All; $content < io('http://example.org'); # GET webpage into scalar io('http://example.org') > io('index.html'); # GET to file "hello " > io('http://example.org/index.html'); # PUT webpage # two ways of getting a page with a password: $content < io('http://me:secret@example.org'); $content < io('http://example.org')->user('me')->password('secret'); DESCRIPTION
This module extends IO::All for dealing with HTTP URLs. Note that you don't need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an HTTP URL. The SYNOPSIS shows some simple typical examples, but there are many other interesting combinations with other IO::All features! For example, you can get an HTTP URL and write the content to a socket, or to an FTP URL, of to a DBM file. METHODS
This is a subclass of IO::All::LWP. The only new method is "http", which can be used to create a blank IO::All::HTTP object; or it can also take an HTTP URL as a parameter. Note that in most cases it is simpler just to call io('http://example.com'), which calls the "http" method automatically. OPERATOR OVERLOADING
The same operators from IO::All may be used. < GETs an HTTP URL; > PUTs to an HTTP URL. SEE ALSO
IO::All, IO::All::LWP, LWP. AUTHORS
Ivan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org> COPYRIGHT
Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.10.0 2007-03-29 IO::All::HTTP(3pm)

Check Out this Related Man Page

HTTP::Response::Encoding(3pm)				User Contributed Perl Documentation			     HTTP::Response::Encoding(3pm)

NAME
HTTP::Response::Encoding - Adds encoding() to HTTP::Response VERSION
$Id: Encoding.pm,v 0.5 2007/05/12 09:24:15 dankogai Exp $ SYNOPSIS
use LWP::UserAgent; use HTTP::Response::Encoding; my $ua = LWP::UserAgent->new(); my $res = $ua->get("http://www.example.com/"); warn $res->encoding; EXPORT
Nothing. METHODS
This module adds the following methods to HTTP::Response objects. "$res->charset" Tells the charset exactly as appears in the "Content-Type:" header. Note that the presence of the charset does not guarantee if the response content is decodable via Encode. To normalize this, you should try $res->encoder->mime_name; # with Encode 2.21 or above or use I18N::Charset; # ... mime_charset_name($res->encoding); "$res->encoder" Returns the corresponding encoder object or undef if it can't. "$res->encoding" Tells the content encoding in the canonical name in Encode. Returns undef if it can't. For most cases, you are more likely to successfully find encoding after GET than HEAD. HTTP::Response is smart enough to parse <meta http-equiv="Content-Type" content="text/html; charset=whatever"/> But you need the content to let HTTP::Response parse it. If you don't want to retrieve the whole content but interested in its encoding, try something like below; my $req = HTTP::Request->new(GET => $uri); $req->headers->header(Range => "bytes=0-4095"); # just 1st 4k my $res = $ua->request($req); warn $res->encoding; "$res->decoded_content" Discontinued since HTTP::Message already has this method. See HTTP::Message for details. INSTALLATION
To install this module, run the following commands: perl Makefile.PL make make test make install AUTHOR
Dan Kogai, "<dankogai at dan.co.jp>" BUGS
Please report any bugs or feature requests to "bug-http-response-encoding at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTTP-Response-Encoding>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc HTTP::Response::Encoding You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/HTTP-Response-Encoding> o CPAN Ratings <http://cpanratings.perl.org/d/HTTP-Response-Encoding> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-Response-Encoding> o Search CPAN <http://search.cpan.org/dist/HTTP-Response-Encoding> ACKNOWLEDGEMENTS
GAAS for LWP. MIYAGAWA for suggestions. COPYRIGHT &; LICENSE Copyright 2007 Dan Kogai, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-07-12 HTTP::Response::Encoding(3pm)
Man Page