Methods
end
- end(data?, encoding?): void
Parameters
Optional
data: string | BufferOptional
encoding: string
Returns void
getHeader
- getHeader(name): string
Returns string
json
- json(obj): void
Returns void
redirect
- redirect(url): void
Returns void
- redirect(status, url): void
Parameters
- status: number
- url: string
Returns void
setHeader
- setHeader(name, value): Response
Parameters
- name: string
- value: string
write
- write(data, encoding?): Response
Parameters
- data: string | Buffer
Optional
encoding: string
Response represents the response to an API request.