1HTTP::OAI::UserAgent(3pUms)er Contributed Perl DocumentatHiToTnP::OAI::UserAgent(3pm)
2
3
4
6 HTTP::OAI::UserAgent - Extension of the LWP::UserAgent for OAI HTTP
7 requests
8
10 This module provides a simplified mechanism for making requests to an
11 OAI repository, using the existing LWP::UserAgent module.
12
14 require HTTP::OAI::UserAgent;
15
16 my $ua = new HTTP::OAI::UserAgent;
17
18 my $response = $ua->request(
19 baseURL=>'http://arXiv.org/oai1',
20 verb=>'ListRecords',
21 from=>'2001-08-01',
22 until=>'2001-08-31'
23 );
24
25 print $response->content;
26
28 $ua = new HTTP::OAI::UserAgent(proxy=>'www-cache',...)
29 This constructor method returns a new instance of a
30 HTTP::OAI::UserAgent module. All arguments are passed to the
31 LWP::UserAgent constructor.
32
33 $r = $ua->request($req)
34 Requests the HTTP response defined by $req, which is a
35 HTTP::Request object.
36
37 $r = $ua->request(baseURL=>$baseref, verb=>$verb, %opts)
38 Makes an HTTP request to the given OAI server (baseURL) with OAI
39 arguments. Returns an HTTP::Response object.
40
41 OAI-PMH related options:
42
43 from => $from
44 until => $until
45 resumptionToken => $token
46 metadataPrefix => $mdp
47 set => $set
48
49 $time_d = $ua->delay( $time_d )
50 Return and optionally set a time (in seconds) to wait between
51 requests. $time_d may be a CODEREF.
52
53
54
55perl v5.38.0 2023-07-20 HTTP::OAI::UserAgent(3pm)