Skip to content

Commit 235b78e

Browse files
authored
Add APIGatewayV2HTTPResponse which includes the new Cookies field. This field does not work on payload format version 1.0. (#280)
1 parent fc7add7 commit 235b78e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

events/apigw.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ type APIGatewayV2HTTPRequestContextHTTPDescription struct {
9393
UserAgent string `json:"userAgent"`
9494
}
9595

96+
// APIGatewayV2HTTPResponse configures the response to be returned by API Gateway V2 for the request
97+
type APIGatewayV2HTTPResponse struct {
98+
StatusCode int `json:"statusCode"`
99+
Headers map[string]string `json:"headers"`
100+
MultiValueHeaders map[string][]string `json:"multiValueHeaders"`
101+
Body string `json:"body"`
102+
IsBase64Encoded bool `json:"isBase64Encoded,omitempty"`
103+
Cookies []string `json:"cookies"`
104+
}
105+
96106
// APIGatewayRequestIdentity contains identity information for the request caller.
97107
type APIGatewayRequestIdentity struct {
98108
CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`

0 commit comments

Comments
 (0)