HTTP::...rAgent(3pm)
π NAME π
okay so bestie, gather round: this is the manual page for HTTP::...rAgent(3pm), and the module it's all about is HTTP::OAI::UserAgent β literally an extension of the LWP::UserAgent made for OAI HTTP requests. that's the whole vibe. π
β¨ DESCRIPTION β¨
so here's the tea π«: this module gives you a simplified mechanism for making requests to an OAI repository, and it does it by riding on the existing LWP::UserAgent module. that's it, that's the pitch. lowkey elegant, highkey useful. π¦
πΈ SYNOPSIS πΈ
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;
like. look at that. no cap, that's the entire flow. π
π METHODS π
$ua = new HTTP::OAI::UserAgent(proxy=>'www-cache',...)β this constructor method hands you back a brand new instance of aHTTP::OAI::UserAgentmodule. and the way that every single argument gets passed straight through to theLWP::UserAgentconstructor?? obsessed. π«Ά$r = $ua->request($req)β requests the HTTP response defined by$req, which is aHTTP::Requestobject. simple. clean. iconic.$r = $ua->request(baseURL=>$baseref, verb=>$verb, %opts)β makes an HTTP request to the given OAI server (baseURL) with OAI arguments, and returns anHTTP::Responseobject. bestie, it just works. β¨
OAI-PMH related options, aka the lil extras you can sprinkle in:
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. π°οΈ and heads up:$time_dmay be aCODEREF. yes fr fr, a coderef. she contains multitudes. π
and that's the page, bestie π this lil gem ships with perl v5.36.0, dated 2023-09-28, straight outta the User Contributed Perl Documentation. go forth and query your OAI repos, main character. πβ
π¦ where this page comes from
- debian trixie: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu noble: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu resolute: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- ubuntu stonking: libhttp-oai-perl 4.13-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms