Field | Description |
---|---|
body | The request body. |
getHeader | Returns the value of the specific request header. |
headers | All request headers. |
queryParams | The query parameters from the request. |
queryString | The query added to the endpoint URL. |
uri | The entire request URL. |
url | The entire request URL. |
Example:
The body of the request.
Name | Type |
---|---|
body | Array |
Example:
getHeader
Returns the value of the header specified.
Name | Type |
---|---|
getHeader | String |
Example:
const acceptHeader = request.getHeader('accept'); |
This method allows defining all request headers and their values.
Name | Type |
---|---|
headers | Array |
Example:
Example:
Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now [ 'active' => false 'name' => 'now' ] |
Example:
Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now [ active=false&name=now ] |
Example:
const query = request.uri; //"api/now/table/myTable" Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now. |
Example:
const query = request.url; //"https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now" Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now |