Skip to content

Commit

Permalink
Omit HTTPMethod in APIGatewayWebsocketProxyRequest (#355)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
calavera and bmoffatt authored Mar 2, 2021
1 parent 3b0c5cc commit e60bf50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events/apigw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit e60bf50

Please sign in to comment.