Class: ApiResponse

ApiResponse()

new ApiResponse()

Represents an ApiResponse
Do not call constructor directly
Bluenimble container creates it internally and makes it available for your services to use
Source:

Members

(readonly) status :integer

The status of this response
Type:
  • integer
Source:

Methods

error(status, message)

Attach an error to the response
Parameters:
Name Type Description
status integer the status code
message Object the error message
Source:

set(key, value)

Set a header value
Parameters:
Name Type Description
key string the name of the header
value Object the value of the header
Source:

setStatus(status)

Set the status of this response
Parameters:
Name Type Description
status integer the status code
Source: