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.
- Source:
Members
(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.
- Source:
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.
- Source:
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.
- Source:
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.
- Source:
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)
- Source:
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.
- Source:
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.
- Source:
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)
- Source:
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 theindex.jss
file is in/dir1
thenrestPath=dir2/dir3/resource1
. This property is useful for implementing REST APIs.
- Source:
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.
- Source:
The path of the currently executing script.
Type:
- String
(static) uri :String
- Description:
The full requested URI.
- Source:
The full requested URI.
Type:
- String
(static) uriParts :Object
- Description:
Provides easy access to various components of the URI
- Source:
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