logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SRU::Request - Factories for creating SRU request objects.

Description

       SRU::Request allows you to create the appropriate SRU request object from a URI object. This allows you
       to pass in a URI and get back one of SRU::Request::Explain, SRU::Request::Scan or
       SRU::Request::SearchRetrieve depending on the type of URI that is passed in. See the docs for those
       classes for more information about what they contain.

Methods

new(%query|$uri|$cgi|$env)
       Create a new request object which is one of:

       •   SRU::Request::Explain

       •   SRU::Request::Scan

       •   SRU::Request::SearchRetrieve

       One can pass query parameters as hash, as URL, as URI, as CGI object or as PSGI request.

       If  the  request  is  not formatted properly the call will return undef.  The error encountered should be
       available in $SRU::Error.

   newFromURInewFromCGI
       Deprecated aliases for "new".

   asXML()
       Used to generate <echoedExplainRequest>, <echoedSearchRetrieveRequest> and  <echoedScanRequest>  elements
       in the response.

   asURI([$base])
       Creates  a  URI  of  this  request.  The  optional  "base"  URL,  provided as string or as URI, is set to
       "http://localhost/" by default.

   type()
       Returns 'searchRetrieve', 'scan' or 'explain' depending on what type of object it is.

Name

       SRU::Request - Factories for creating SRU request objects.

Synopsis

           use SRU::Request;
           my $request = SRU::Request->newFromURI( $uri );

See Also