HTTP::Handle

HTTP::Handle is a HTTP Class designed for streaming.
Download

HTTP::Handle Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jordan Sissel
  • Publisher web site:
  • http://search.cpan.org/~psionic/HTTP-Handle-0.2/Handle.pm

HTTP::Handle Tags


HTTP::Handle Description

HTTP::Handle is a HTTP Class designed for streaming. HTTP::Handle is a 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 () { print "--> $_"; }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.Arguments possible:url => "http://www.google.com/"Sets the initial URL to connect to.follow_redirects => Automatically follow HTTP redirects. This defaults to true (1). Set to 0 to disable this.http_request => HASHREFAny thing put in here will be sent as "key: value" in the http request string.$http->connect()Connect, send the http request, and process the response headers.This function returns -1 on failure, undef otherwise. The reason for failure will be printed to STDERR.$http->fd()Get the file descriptor (socket) we're using to connect.$http->url( )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( )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. Requirements: · Perl


HTTP::Handle Related Software