HTTP::OAI::UserAgent(3pm) User Contributed Perl Documentation HTTP::OAI::UserAgent(3pm)NAME
HTTP::OAI::UserAgent - Extension of the LWP::UserAgent for OAI HTTP requests
DESCRIPTION
This module provides a simplified mechanism for making requests to an OAI repository, using the existing LWP::UserAgent module.
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;
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
$str = $ua->url(baseURL=>$baseref, verb=>$verb, ...)
Takes the same arguments as request, but returns the URL that would be requested.
$time_d = $ua->delay( $time_d )
Return and optionally set a time (in seconds) to wait between requests. $time_d may be a CODEREF.
perl v5.12.4 2011-06-23 HTTP::OAI::UserAgent(3pm)
Check Out this Related Man Page
HTTP::OAI::ListIdentifiers(3pm) User Contributed Perl Documentation HTTP::OAI::ListIdentifiers(3pm)NAME
HTTP::OAI::ListIdentifiers - Provide access to an OAI ListIdentifiers response
SYNOPSIS
my $r = $h->ListIdentifiers;
while(my $rec = $r->next) {
print "identifier => ", $rec->identifier, "
",
print "datestamp => ", $rec->datestamp, "
" if $rec->datestamp;
print "status => ", ($rec->status || 'undef'), "
";
}
die $r->message if $r->is_error;
METHODS
$li = new OAI::ListIdentifiers
This constructor method returns a new OAI::ListIdentifiers object.
$rec = $li->next
Returns either an HTTP::OAI::Header object, or undef, if there are no more records. Use $rec->is_error to test whether there was an
error getting the next record (otherwise things will break).
If -resume was set to false in the Harvest Agent, next may return a string (the resumptionToken).
@il = $li->identifier([$idobj])
Returns the identifier list and optionally adds an identifier or resumptionToken, $idobj. Returns an array ref of HTTP::OAI::Headers.
$dom = $li->toDOM
Returns a XML::DOM object representing the ListIdentifiers response.
$token = $li->resumptionToken([$token])
Returns and optionally sets the HTTP::OAI::ResumptionToken.
perl v5.12.4 2007-06-28 HTTP::OAI::ListIdentifiers(3pm)
this may be very basic to some but all new to me
I have an application running on SCO Unix server which issues an HTTP Post request to a server with the results being returned in I.E browser window in XML format
I need to import these results into my customers application and dont know how to... (1 Reply)
The Web-based contact form on my site has been under distributed spamming attacks for nearly a month already. Obviously, a spammer has tried to generate HTTP requests containing ads to male drugs and all sorts of similar stuff directly to the form mail processor script on my site using a robot, as... (5 Replies)
At the moment I have the following code which visits the site then saves the page:
$req = HTTP::Request->new(POST => $url . '/search.php');
$data = $ua->request($req)->decoded_content;
open(HTMLfile, '>hello.html'); print HTMLfile $data; close(HTMLfile);
From the page it saves theres a URL,... (6 Replies)
Hello
I am trying to communicate with a server that is ready to accept HTTP GET requests and send back data per the request. However, I have very little experience in socket programming and I don't really know how to debug this. Googling on the web hasn't yielded much, except people saying I... (2 Replies)
Hi friends,
A script needs to be created to collect all HTTP GET requests containing a particular string say abcd.gif in the url path along with the IP address of the client that issued the request. The source of this data is the web server logs. Also Each script execution should extract... (4 Replies)
Hi,
I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log.
Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)