Library: request
Overview
Helpers for reading data from the HTTP request.
source: request.js
Functions
Enables pretty-printing of request object for debugging.
returns
| string | html-formatted string. |
Objects
string
The request path following the hostname. For example, if the user
is visiting yourapp.appjet.net/foo, then this will be set to
"/foo".
This does not include CGI parameters or the domain name, and always
begins with a "/".
string
The value request query string.
For example, if the user visits "yourapp.appjet.net/foo?id=20", then
request.query will be "id=20".
object
Parameters associated with the request, either from the query string
or from the contents of a POST, e.g. from a form. Parameters are accessible
by name as properties of this object. The property value is either a
string (typically) or an array of strings (if the parameter occurs
multiple times in the request).
object
Used to access the HTTP headers of the current request. Properties are
header names, and each value is either a string (typically) or an
array of strings (if the header occurs multiple times in the request).
examples
print(request.headers["User-Agent"]);