Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
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:
body
The body of the request.
Name | Type |
---|---|
body | Array |
Example:
getHeader
Returns the value of the header specified.
Name | Type |
---|---|
getHeader | String |
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
const acceptHeader = request.getHeader('accept'); |
headers
This method allows defining all request headers and their values.
Name | Type |
---|---|
headers | Array |
Example:
Code Block |
---|
queryParams
Example:
Code Block |
---|
Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now
[
'active' => false
'name' => 'now'
] |
queryString
Example:
Code Block |
---|
Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now [ active=false&name=now ] |
uri
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
const query = request.uri; //"api/now/table/myTable"
Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now. |
url
Example:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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 |
body
The body of the request.
Parameters:
...
Name
Table of Contents | ||||
---|---|---|---|---|
|
...