Skip to content

Constants

Amir Yasin edited this page Mar 12, 2015 · 1 revision

Constants

The Server object exposes a CONSTANTS field. This is a description of those constants.

REQUEST_BODY

The name of the parameter containing the request body. In a when function you would access this as input[server.CONSTANTS.REQUEST_BODY]

QUERY_VARS

The name of the object containing the query parameters (everything after the ? in the URL) as an object.

REQUEST

The name of the variable containing the raw HTTP request.

URL_VARS

The name of the variable containing the URL variables object. This object contains the vars as { varName: value ). In /clients/:clientId/files if the user navigated to /clients/22/files the object would contain {clientId : '22'}.

URL_DETAILS

The name of the variable containing the parsed URL.

URL_VAR_WILDCARD

The name of the variable containing the wildcard portion of the path. In the path /clients/* if the user navigated to /clients/22/files the variable at this name would contain 22/files.

HEADER_CONTENT_TYPE

The name of the content type header key which you can use to set the content type header.

HEADER_CONTENT_LENGTH

The name of the content length header key which you can use to set the content length header.

HEADER_CONTENT_DISPOSITION

The name of the content disposition header key.

HEADER_LAST_MODIFIED

The name of the last modified header key.

HEADER_COOKIE

The name of the cookie header key.

Clone this wiki locally