GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ASTRO::CATALOG::TRANSPORT::REST (3)

.ds Aq ’

NAME

Astro::Catalog::Transport::REST - A base class for REST query modules

CONTENTS

SYNOPSIS



  use base qw/ Astro::Catalog::Transport::REST /;



DESCRIPTION

This class forms a base class for all the REST based query classes provided in the Astro::Catalog distribution (eg Astro::Catalog::Query::GSC).

REVISION

$Id: REST.pm,v 1.7 2004/03/03 00:50:15 cavanagh Exp $

METHODS

    Constructor

<B>newB> Create a new instance from a hash of options



  $q = new Astro::Catalog::Transport::REST( Coords    => new Astro::Coords(),
                                            Radius    => $radius,
                                            Bright    => $magbright,
                                            Faint     => $magfaint,
                                            Sort      => $sort_type,
                                            Number    => $number_out );



returns a reference to an query object. Must only called from sub-classed constructors.

RA and Dec are also allowed but are deprecated (since with only RA/Dec the coordinates must always be supplied as J2000 space-separated sexagesimal format).

<B>useragentB> The LWP user agent mediating the web transaction.



  $ua = $q->useragent();



Created automatically the first time it is requested.

<B>querydbB> Returns an Astro::Catalog object resulting from the specific query.



   $catalog = $q->querydb();



<B>proxyB> Return (or set) the current proxy for the catalog request.



   $usno->proxy( http://wwwcache.ex.ac.uk:8080/ );
   $proxy_url = $usno->proxy();



<B>timeoutB> Return (or set) the current timeout in seconds for the request.



   $usno->timeout( 30 );
   $proxy_timeout = $usno->timeout();



Default is 30 seconds.

<B>query_urlB> The URL formed to build up a query. Made up of a root host name (that can be set using the url method) and a fixed suffix that specifies the path to the service (CGI or otherwise). This query URL does not include the arguments to the CGI script (but will include the question mark if appropriate).



  $query_url = $q->query();
  $q->query_url( http://www.blah.org/cgi-bin/xxx.pl?);



Care must be taken when setting this value.

The argument is not validated. There may also need to be a new method that returns the full URL including arguments.

If no value has been supplied, a default will be returned.

<B>urlB> Return the current remote host for the query (the full URL can be returned using the query_url method).



   $host = $q->url();



Can also be used to set the root host for the URL (ie the machine name but no path component)



   $q->url( "archive.eso.org" );



if not defined the default URL is used (specified in the sub class). This method should really be called remote_host.

Returns the default host name specified by the particular subclass if a value has not been defined.

<B>agentB> Returns the user agent tag sent by the module to the server.



   $agent_tag = $q->agent();



The user agent tag can not be set by this method.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ASTRO::CATALOG::TRANSPORT::REST (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.