ServiceRequest
Index
Constructors
constructor
Returns ServiceRequest
Methods
ack
Acknowledge the request. Used for SEND requests
Returns Promise<void>
a Promise that completes once the ack is sent
body
Get the request body.
Returns Object
the request body
fail
Reply to the request with and error.
Parameters
error: Error
the error to send
Returns Promise<void>
a Promise that completes once the error is sent
notifyOn
Send the topic where the requester should listen to get notifications. Used for OBSERVE requests.
Parameters
topic: string
the topic where the client should
Returns Promise<void>
a Promise that completes once the reply is sent
reply
Send a reply to the request with a content payload. Used for GET requests
Parameters
payload: Object
the payload of the reply
Returns Promise<void>
a Promise that completes once the reply is sent
userTag
Get the requesting client’s user tag.
Returns Promise<string>
the user tag
A request consumed by a service.