You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »


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:

getHeader
const acceptHeader = request.getHeader('accept');

headers


This method allows defining all request headers and their values.

NameType
headersArray

Example:


queryParams


Example:

Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now
[
   'active' => false
   'name' => 'now'
]

queryString


Example:

Source request URL: https://instance.simpleone.ru/api/now/table/myTable?active=false&name=now
[
   active=false&name=now
]

uri




Example:

URI
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:

URL
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

  • No labels