AwsApiGatewayResponse class final

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.new(String body, {bool isBase64Encoded = false, int statusCode = 200, Map<String, String> headers = const {}})
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.
const
AwsApiGatewayResponse.fromJson(Map<String, dynamic> body, {bool isBase64Encoded = false, int statusCode = 200, Map<String, String> headers = const {}})
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.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The HTTP headers that should be send with the response to the client.
final
isBase64Encoded bool
Indicates if the body is Base64 encoded or not. By default is false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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
A string representation of this object.
inherited

Operators

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