Optionalheaders: Record<string, string>Staticaccepted202 Accepted — serializes value using content negotiation.
Optionalheaders: Record<string, string>Staticbad400 Bad Request — serializes value as JSON.
Optionalheaders: Record<string, string>Staticconflict409 Conflict — serializes value as JSON.
Optionalheaders: Record<string, string>StaticcontentArbitrary string body with an explicit content type.
Staticcreated201 Created — serializes value using content negotiation.
Optionallocation: stringOptionalheaders: Record<string, string>StaticfileSend a file buffer as a download attachment.
Staticforbidden403 Forbidden — serializes value as JSON.
Optionalheaders: Record<string, string>StaticjsonExplicit JSON response with a specific status code.
Use the named factories (ok, notFound, etc.) for common codes.
This overload is an escape hatch for uncommon status codes.
Explicit JSON response with a specific status code.
Use the named factories (ok, notFound, etc.) for common codes.
This overload is an escape hatch for uncommon status codes.
Staticno204 No Content.
Staticnot404 Not Found — serializes value as JSON.
Optionalheaders: Record<string, string>Staticok200 OK — serializes value using content negotiation.
Optionalheaders: Record<string, string>StaticredirectTemporary (302) or permanent (301) redirect.
StaticstatusBare status code with no body.
Optionalheaders: Record<string, string>StaticstreamPipe a Readable stream to the response.
OptionalfileName: stringStaticunauthorized401 Unauthorized — serializes value as JSON.
Optionalheaders: Record<string, string>
Responds with a bare HTTP status code and no body. Created by
ActionResult.status().