Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


FieldDescription
bodyThe request body.
getHeaderReturns the value of the specific request header.
headersAll request headers.
queryParamsThe query parameters from the request.
queryStringThe query added to the endpoint URL.
uriThe entire request URL.
urlThe entire request URL.

Example:


body


The body of the request.


Name

Type
bodyArray

Example:




getHeader


Returns the value of the header specified.

NameType
getHeaderString

Example:

Code Block
languagejs
themeEclipse
titlegetHeader
linenumberstrue
const acceptHeader = request.getHeader('accept');


headers


This method allows defining all request headers and their values.

NameType
headersArray

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
languagexml
themeEclipse
titleURI
linenumberstrue
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
languagexml
themeEclipse
titleURL
linenumberstrue
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
absoluteUrltrue
classfixedPosition

...