Global

Members

(private, constant) jsonContentTypes

Description:
  • Supported JSON content type values ['application/json', 'application/problem+json', 'application/vnd.api+json', 'application/hal+json'].
Source:
Supported JSON content type values ['application/json', 'application/problem+json', 'application/vnd.api+json', 'application/hal+json'].

Methods

isDeleteReq(req) → {boolean}

Description:
  • Function that check if current request is a http DELETE method request or not.
Source:
Parameters:
Name Type Description
req Object Http request object
Properties
Name Type Description
method string Http request method string
Returns:
Type
boolean

isGetReq(req) → {boolean}

Description:
  • Function that check if current request is a http GET method request or not.
Source:
Parameters:
Name Type Description
req Object Http request object
Properties
Name Type Description
method string Http request method string
Returns:
Type
boolean

isJsonReq(req) → {boolean}

Description:
  • Function that check if current request is a json request or not.
Source:
Parameters:
Name Type Description
req Object Http request object
Properties
Name Type Description
headers Object Http request headers object
Properties
Name Type Description
"content-type" string Http request content-type header
Returns:
Type
boolean

isPostReq(req) → {boolean}

Description:
  • Function that check if current request is a http POST method request or not.
Source:
Parameters:
Name Type Description
req Object Http request object
Properties
Name Type Description
method string Http request method string
Returns:
Type
boolean

isPutReq(req) → {boolean}

Description:
  • Function that check if current request is a http PUT method request or not.
Source:
Parameters:
Name Type Description
req Object Http request object
Properties
Name Type Description
method string Http request method string
Returns:
Type
boolean