The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


HTTP::Handle - HTTP Class designed for streaming


 use HTTP::Handle;

 my $http = HTTP::Handle->new( uri => "" );
 my $fd = $http->fd();
 while (<$fd>) {
        print "--> $_";


Version: 0.1

$Id:,v 1.1 2004/05/01 07:38:03 psionic Exp $


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.


Create a new HTTP::Handle object thingy.


Connect, send the http request, and process the response headers.


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).


Returns a string containing the HTTP request and headers, this is used when $http->connect() is called.


Jordan Sissel <>