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::Record(3pm) User Contributed Perl Documentation HTTP::OAI::Record(3pm)NAME
HTTP::OAI::Record - Encapsulates an OAI record
SYNOPSIS
use HTTP::OAI::Record;
# Create a new HTTP::OAI Record
my $r = new HTTP::OAI::Record();
$r->header->identifier('oai:myarchive.org:oid-233');
$r->header->datestamp('2002-04-01');
$r->header->setSpec('all:novels');
$r->header->setSpec('all:books');
$r->metadata(new HTTP::OAI::Metadata(dom=>$md));
$r->about(new HTTP::OAI::Metadata(dom=>$ab));
METHODS
$r = new HTTP::OAI::Record( %opts )
This constructor method returns a new HTTP::OAI::Record object.
Options (see methods below):
header => $header
metadata => $metadata
about => [$about]
$r->header([HTTP::OAI::Header])
Returns and optionally sets the record header (an HTTP::OAI::Header object).
$r->metadata([HTTP::OAI::Metadata])
Returns and optionally sets the record metadata (an HTTP::OAI::Metadata object).
$r->about([HTTP::OAI::Metadata])
Optionally adds a new About record (an HTTP::OAI::Metadata object) and returns an array of objects (may be empty).
Header Accessor Methods
These methods are equivalent to "$rec->header->$method([$value])".
$r->identifier([$identifier])
Get and optionally set the record OAI identifier.
$r->datestamp([$datestamp])
Get and optionally set the record datestamp.
$r->status([$status])
Get and optionally set the record status (valid values are 'deleted' or undef).
$r->is_deleted()
Returns whether this record's status is deleted.
perl v5.12.4 2011-06-23 HTTP::OAI::Record(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)