Skip to main content

json_response

Function json_response 

Source
pub fn json_response(
    status: u16,
    body: &impl Serialize,
) -> Result<Response<Bytes>, ApiGatewayV2Error>
Expand description

Build a JSON success response with the given status code.

ยงErrors

Returns ApiGatewayV2Error if serialization fails.