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({dynamic body dynamic isBase64Encoded dynamic 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 })
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
isBase64Encoded ↔ bool
Indicates if the body is Base64 encoded or not. By default is false.
read / write
statusCode ↔ int
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

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