Skip to content

Commit

Permalink
aws/signer/v2: Use constant instead of string literal for POST/GET (#635
Browse files Browse the repository at this point in the history
)

Updates the v2 signer to use predefined constants instead of string literals for POST and GET HTTP methods.
  • Loading branch information
heartwilltell committed Jul 14, 2020
1 parent 36e8204 commit c1ad816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/signer/v2/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func SignSDKRequest(req *aws.Request) {
return
}

if req.HTTPRequest.Method != "POST" && req.HTTPRequest.Method != "GET" {
if req.HTTPRequest.Method != http.MethodPost && req.HTTPRequest.Method != http.MethodGet {
// The V2 signer only supports GET and POST
req.Error = errInvalidMethod
return
Expand Down

0 comments on commit c1ad816

Please sign in to comment.