NAME
HTTP::Handle - HTTP Class designed for streaming
SYNOPSIS
use HTTP::Handle;
my $http = HTTP::Handle->new( uri => "http://www.google.com/" );
$http->connect();
my $fd = $http->fd();
while (<$fd>) {
print "--> $_";
}
VERSION
Version: 0.1
$Id: Handle.pm,v 1.1 2004/05/01 07:38:03 psionic Exp $
DESCRIPTION
The HTTP::Handle
module allows you to make HTTP requests and handle the data yourself. The general ideas is that you use this module to make a HTTP request and handle non-header data yourself. I needed such a feature for my mp3 player to listen to icecast streams.
- HTTP::Handle->new()
-
Create a new HTTP::Handle object thingy.
- $http->connect()
-
Connect, send the http request, and process the response headers.
- $http->fd()
-
Get the file descriptor (socket) we're using to connect.
- $http->url( [ url_string ])
-
Get or set the URL. If a url string is passed, you will change the url that is requested. If no parameter is passed, a URI object will be returned containing the
- $http->follow_redirects( [ 0 | 1 ] )
-
If a value is passed then you will set whether or not we will automatically follow HTTP 302 Redirects. If no value is passed, then we will return whatever the current option is.
Defaults to 1 (will follow redirects).
- $http->http_request_string()
-
Returns a string containing the HTTP request and headers, this is used when $http->connect() is called.
AUTHOR
Jordan Sissel <psionic@csh.rit.edu>