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  -  CONTINUITY::REQUEST (3)

.ds Aq ’

NAME

Continuity::Request - Simple HTTP::Request-like API for requests inside Continuity

CONTENTS

SYNOPSIS



  sub main {
    my $request = shift;
    $request->print("Hello!");
    $request->next;

    # ...

    $name = $request->param(name);
  }



METHODS

CW$request->next

Suspend execution until a new Web request is available.

CW$val = CW$request->param(’name’);

CW@vals = CW$request->param(’name’);

CW@vals = CW$request->param(’name1’, ’name2’);

Fetch a CGI POST/GET parameter.

If there is more than one parameter with the given name, then scalar context gets the first instance and list context gets all of them. Providing multiple param names will return the values for each (and if one of the params has multiple values then it will be confusing!).

Calling the param method with no parameters is equivalent to calling the params method.

CW%params = CW$request->params();

CW@params = CW$request->params();

Get a list of all key/value pairs. Repeated values are included, but if you treat it like a hash it will act like one.

CW$request->print(‘‘Foo!<br>’’);

Write output (eg, HTML).

Since Continuity juggles many concurrent requests, it’s necessary to explicitly refer to requesting clients, like $request->print(...), rather than simply doing print ....

CW$request->set_cookie(CGI->cookie(...));

CW$request->set_cookie(name => ’value’);

Set a cookie to be sent out with the headers, next time the headers go out (next request if data has been written to the client already, otherwise this request). (May not yet be supported by the FastCGI adapter yet.)

CW$request->uri;

Straight from HTTP::Request, returns a URI object. (Probably not yet supported by the FastCGI adapter.)

CW$request->method;

Returns ’GET’, ’POST’, or whatever other HTTP command was issued. Continuity currently punts on anything but GET and POST out of paranoia.

CW$request->send_headers(‘‘X-HTTP-Header: blah\n’’, CW$h2)

Send this in the headers

INTERNAL METHODS

CW$request->send_basic_header;

Continuity does this for you, but it’s still part of the API of Continuity::Request objects.

CW$request->end_request;

Ditto above.

CW$request->send_static;

Controlled by the staticp => sub { ... } argument pair to the main constructor call to Continuity->new().

DESCRIPTION

This module contains no actual code. It only establishes and documents the interface actually implemented in Continuity::Adapt::FCGI, Continuity::Adapt::HttpDaemon, and, perhaps eventually, other places.

SEE ALSO

Continuity
Continuity::Adapt::FCGI
Continuity::Adapt::HttpDaemon
Continuity::RequestCallbacks
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CONTINUITY::REQUEST (3) 2010-06-01

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