NAME

URI::Fetch - Smart URI fetching/caching

SYNOPSIS

use URI::Fetch;

        ## Simple fetch.
        my $res = URI::Fetch->fetch('http://example.com/atom.xml')
            or die URI::Fetch->errstr;

        ## Fetch using specified ETag and Last-Modified headers.
        $res = URI::Fetch->fetch('http://example.com/atom.xml',
                ETag => '123-ABC',
                LastModified => time - 3600,
        )
            or die URI::Fetch->errstr;

        ## Fetch using an on-disk cache that URI::Fetch manages for you.
        my $cache = Cache::File->new( cache_root => '/tmp/cache' );
        $res = URI::Fetch->fetch('http://example.com/atom.xml',
                Cache => $cache
        )
            or die URI::Fetch->errstr;

DESCRIPTION

URI::Fetch is a smart client for fetching HTTP pages, notably syndication feeds (RSS, Atom, and others), in an intelligent, bandwidthand time-saving way. That means:

USAGE
URI::Fetch->fetch($uri, %param)
Fetches a page identified by the URI $uri.

On success, returns a URI::Fetch::Response object; on failure, returns "undef".

%param can contain:

LICENSE

URI::Fetch is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR & COPYRIGHT

Except where otherwise noted, URI::Fetch is Copyright 2004 Benjamin Trott, ben+cpan@stupidfool.org. All rights reserved.