AwsApiGatewayResponse class

API Gateway Response contains the data for a response to the API Gateway. It contains the body of the HTTP response. It also contains a HTTP Status Code which by default is 200. Furthermore it indicates if the body is Base64 encoded or not.

Constructors

AwsApiGatewayResponse({String body, bool isBase64Encoded, Map<String, String> headers, int statusCode})
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.
AwsApiGatewayResponse.fromJson(Map<String, dynamic> body, {bool isBase64Encoded, int statusCode, Map<String, String> headers})
The factory creates a new AwsApiGatewayResponse from JSON. It optionally accepts the Base64 encoded flag and a HTTP Status Code for the response.
factory

Properties

body String
The body of the HTTP Response send from the API Gateway to the client.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
headers Map<String, String>
The HTTP headers that should be send with the response to the client.
read / write
isBase64Encoded bool
Indicates if the body is Base64 encoded or not. By default is false.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
statusCode int
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Returns the JSON representation of the response. This is called by the JSON encoder to produce the response.
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited