HTTP::OAI::Response(3) An OAI response


"HTTP::OAI::Response" inherits from HTTP::Response and supplies some utility methods for OAI.


$r = new HTTP::OAI::Response([responseDate=>$rd][, requestURL=>$ru])
This constructor method returns a new HTTP::OAI::Response object. Optionally set the responseDate and requestURL.

Use $r->is_error to test whether the request was successful. In addition to the HTTP response codes, the following codes may be returned:

600 - Error parsing XML or invalid OAI response

Use $r->message to obtain a human-readable error message.

$r->copy_from( $r )
Copies an HTTP::Response $r into this object.
$headers = $r->headers
Returns an HTTP::OAI::Headers object.
$errs = $r->errors([$err])
Returns and optionally adds to the OAI error list. Returns a reference to an array.
$rd = $r->responseDate( [$rd] )
Returns and optionally sets the response date.
$ru = $r->requestURL( [$ru] )
Returns and optionally sets the request URL.
$verb = $r->verb( [$verb] )
Returns and optionally sets the OAI verb.
Return the version of the OAI protocol used by the remote site (protocolVersion is automatically changed by the underlying API).
$r->xslt( $url )
Set the stylesheet to use in a response.

NOTE - requestURI/request

Version 2.0 of OAI uses a ``request'' element to contain the client's request, rather than a URI. The OAI-PERL library automatically converts from a URI into the appropriate request structure, and back again when harvesting.

The exception to this rule is for badVerb errors, where the arguments will not be available for conversion into a URI.