From bfca7f53daf451558c551eaeaef901129aad20ab Mon Sep 17 00:00:00 2001 From: David Calavera Date: Fri, 5 Feb 2021 11:27:53 -0800 Subject: [PATCH] Omit HTTPMethod in APIGatewayWebsocketProxyRequest These requests don't always include the HTTP Method, since the websocket protocol doesn't enforce it. Signed-off-by: David Calavera --- 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"`