basalt / fastify/src / HttpReply
Interface: HttpReply
Defined in: http/src/route.ts:47
Framework-neutral response. code().header().send() is the common surface; sent lets the adapter know whether to also emit the handler's return value.
Properties
raw
> raw: unknown
Defined in: http/src/route.ts:54
sent
> readonly sent: boolean
Defined in: http/src/route.ts:52
statusCode
> readonly statusCode: number
Defined in: http/src/route.ts:53
Methods
code()
> code(status): this
Defined in: http/src/route.ts:48
Parameters
status
number
Returns
this
header()
> header(name, value): this
Defined in: http/src/route.ts:49
Parameters
name
string
value
string
Returns
this
send()
> send(payload?): unknown
Defined in: http/src/route.ts:51
Sends the payload; omit it for an empty body (e.g. a 204).
Parameters
payload?
unknown
Returns
unknown