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
Astro::Catalog::Transport::REST(3) User Contributed Perl Documentation Astro::Catalog::Transport::REST(3)

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

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

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

new
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).

useragent
The LWP user agent mediating the web transaction.

    $ua = $q->useragent();
    

Created automatically the first time it is requested.

querydb
Returns an Astro::Catalog object resulting from the specific query.

    $catalog = $q->querydb();
    
proxy
Return (or set) the current proxy for the catalog request.

    $usno->proxy('http://wwwcache.ex.ac.uk:8080/');
    $proxy_url = $usno->proxy();
    
timeout
Return (or set) the current timeout in seconds for the request.

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

Default is 30 seconds.

query_url
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.

url
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.

agent
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.

2022-05-14 perl v5.32.1

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

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