From e60bf50ff4fe37820431ee7eb636969efdf8b187 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Mon, 1 Mar 2021 21:59:30 -0800 Subject: [PATCH] Omit HTTPMethod in APIGatewayWebsocketProxyRequest (#355) These requests don't always include the HTTP Method, since the websocket protocol doesn't enforce it. Signed-off-by: David Calavera Co-authored-by: Bryan Moffatt --- events/apigw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/apigw.go b/events/apigw.go index 83b4cbc8..3260d13e 100644 --- a/events/apigw.go +++ b/events/apigw.go @@ -149,7 +149,7 @@ type APIGatewayRequestIdentity struct { type APIGatewayWebsocketProxyRequest struct { Resource string `json:"resource"` // The resource path defined in API Gateway Path string `json:"path"` // The url path for the caller - HTTPMethod string `json:"httpMethod"` + HTTPMethod string `json:"httpMethod,omitempty"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` QueryStringParameters map[string]string `json:"queryStringParameters"`