json
Response method responsible for handling json style payloads
Last updated
Response method responsible for handling json style payloads
Last updated
The json
method is a curried function so you don't need to send the parameters all at once
You must supply both arguments at some point within your handler or the function will throw an error on request
You would use the response functions within your method handlers you can read about the methods here
Name
Type
Description
code
Number
The status code to set for the response
data
Any
The json payload to send back to the requester