Skip to content

Commit e60bf50

Browse files
calaverabmoffatt
andauthored
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 <david.calavera@gmail.com> Co-authored-by: Bryan Moffatt <bmoffatt@users.noreply.github.com>
1 parent 3b0c5cc commit e60bf50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

events/apigw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ type APIGatewayRequestIdentity struct {
149149
type APIGatewayWebsocketProxyRequest struct {
150150
Resource string `json:"resource"` // The resource path defined in API Gateway
151151
Path string `json:"path"` // The url path for the caller
152-
HTTPMethod string `json:"httpMethod"`
152+
HTTPMethod string `json:"httpMethod,omitempty"`
153153
Headers map[string]string `json:"headers"`
154154
MultiValueHeaders map[string][]string `json:"multiValueHeaders"`
155155
QueryStringParameters map[string]string `json:"queryStringParameters"`

0 commit comments

Comments
 (0)