Skip to content

API reference / @backpack/aws-lambda / rest / jsonOk

Function: jsonOk()

Call Signature

ts
function jsonOk<T>(body, options?): APIGatewayProxyResult;

Returns a APIGatewayProxyResult for JSON content with an HTTP 200 OK status code.

Type Parameters

Type Parameter
T

Parameters

ParameterType
bodyT
options?Omit<JsonResultOptions, "statusCode">

Returns

APIGatewayProxyResult

Call Signature

ts
function jsonOk<T>(body, options): APIGatewayProxyResult;

Returns a APIGatewayProxyResult for JSON content with an HTTP 200 OK status code.

Type Parameters

Type Parameter
T

Parameters

ParameterType
bodyNoInfer<T>
optionsOmit<ValidatedJsonResultOptions<T>, "statusCode">

Returns

APIGatewayProxyResult