request

request

Description:
  • Web-apps only

    Gives access to information about the current HTTP request. Accessed via the global variable request. This variable is only available when the script has been invoked by a HTTP request.

Properties

PropertyTypeDescription
cookies Object

Provides access to the cookies in the request.

form Object

Provides access to the form-arguments of the request.

headers Object

Provides access to the headers of the request.

localEndPoint Object

Information about the local end-point.

method String

The request method ('get', 'post', 'head', etc)

.
query Object

Provides access to the query-arguments of the request.

remoteEndPoint Object

Information about the remote end-point.

requestPath String

The path of the request (same as uriParts.

restPath String

The path from the directory of the file containing the currently executing script to the requested resource.

scriptPath String

The path of the currently executing script.

uri String

The full requested URI.

uriParts Object

Provides easy access to various components of the URI

.

Property Details

(static) cookies :Object

Description:
  • Provides access to the cookies in the request. The names of the fields of the returned object are those of the cookies.

Provides access to the cookies in the request. The names of the fields of the returned object are those of the cookies.

Type:
  • Object

(static) form :Object

Description:
  • Provides access to the form-arguments of the request. The names of the fields of the returned object are those of the form-arguments.

Provides access to the form-arguments of the request. The names of the fields of the returned object are those of the form-arguments.

Type:
  • Object

(static) headers :Object

Description:
  • Provides access to the headers of the request. The names of the fields of the returned object are those of the headers.

Provides access to the headers of the request. The names of the fields of the returned object are those of the headers.

Type:
  • Object

(static) localEndPoint :Object

Description:
  • Information about the local end-point.

Properties:
Name Type Description
ip String

IP address of the local end of the connection

port String

Port number of the local end of the connection

Information about the local end-point.

Type:
  • Object

(static) method :String

Description:
  • The request method ('get', 'post', 'head', etc)

The request method ('get', 'post', 'head', etc)

Type:
  • String

(static) query :Object

Description:
  • Provides access to the query-arguments of the request. The names of the fields of the returned object are those of the query-arguments.

Provides access to the query-arguments of the request. The names of the fields of the returned object are those of the query-arguments.

Type:
  • Object

(static) remoteEndPoint :Object

Description:
  • Information about the remote end-point.

Properties:
Name Type Description
ip String

IP address of the remote end of the connection

port String

Port number of the remote end of the connection

Information about the remote end-point.

Type:
  • Object

(static) requestPath :String

Description:
  • The path of the request (same as uriParts.path)

The path of the request (same as uriParts.path)

Type:
  • String

(static) restPath :String

Description:
  • The path from the directory of the file containing the currently executing script to the requested resource. For example, if the request is for /dir1/dir2/dir3/resource1 and the index.jss file is in /dir1 then restPath=dir2/dir3/resource1. This property is useful for implementing REST APIs.

The path from the directory of the file containing the currently executing script to the requested resource. For example, if the request is for /dir1/dir2/dir3/resource1 and the index.jss file is in /dir1 then restPath=dir2/dir3/resource1. This property is useful for implementing REST APIs.

Type:
  • String

(static) scriptPath :String

Description:
  • The path of the currently executing script.

The path of the currently executing script.

Type:
  • String

(static) uri :String

Description:
  • The full requested URI.

The full requested URI.

Type:
  • String

(static) uriParts :Object

Description:
  • Provides easy access to various components of the URI

Properties:
Name Type Description
protocol String
host String
port String
path String
queryString String

Provides easy access to various components of the URI

Type:
  • Object