AwsApiGatewayResponse constructor
The Response that should be returned by the API Gateway for the
Lambda invocation. It has a body
which reflects the body of the HTTP Response.
But also it signals if the body
is Base64 encoded and what the HTTP Status Code
of the response is.
Implementation
AwsApiGatewayResponse({
String body,
bool isBase64Encoded,
Map<String, String> headers,
int statusCode,
}) {
this.body = body ?? '';
this.isBase64Encoded = isBase64Encoded ?? false;
this.headers = headers ?? {"Content-Type": "application/json"};
this.statusCode = statusCode ?? HttpStatus.ok;
}