HTTP::OAI::UserAgent(3pm)

HTTP::OAI::UserAgent3pm

Extension of the lwp::useragent for oai http requests

Usage

        require HTTP::OAI::UserAgent;
        my $ua = new HTTP::OAI::UserAgent;
        my $response = $ua->request(
                baseURL=>'http://arXiv.org/oai1',
                verb=>'ListRecords',
                from=>'2001-08-01',
                until=>'2001-08-31'
        );
        print $response->content;

Overview

This module provides a simplified mechanism for making requests to an OAI repository, using the existing LWP::UserAgent module.

Methods

$ua = new HTTP::OAI::UserAgent(proxy=>'www-cache',...)

This constructor method returns a new instance of a HTTP::OAI::UserAgent module. All arguments are passed to the LWP::UserAgent constructor.

$r = $ua->request($req)

Requests the HTTP response defined by $req, which is a HTTP::Request object.

$r = $ua->request(baseURL=>$baseref, verb=>$verb, %opts)

Makes an HTTP request to the given OAI server (baseURL) with OAI arguments. Returns an HTTP::Response object.

OAI-PMH related options:

        from => $from
        until => $until
        resumptionToken => $token
        metadataPrefix => $mdp
        set => $set
$time_d = $ua->delay( $time_d )

Return and optionally set a time (in seconds) to wait between requests. $time_d may be a CODEREF.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7–8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

From libhttp-oai-perl 4.13-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.