Skip to content

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

Function: jsonResult()

Call Signature

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

Returns a APIGatewayProxyResult for JSON content.

Type Parameters

Type Parameter
T

Parameters

ParameterType
bodyT
optionsJsonResultOptions

Returns

APIGatewayProxyResult

Call Signature

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

Returns a APIGatewayProxyResult for JSON content.

Type Parameters

Type Parameter
T

Parameters

ParameterType
bodyNoInfer<T>
optionsValidatedJsonResultOptions<T>

Returns

APIGatewayProxyResult