Skip to content

Commit c1ad816

Browse files
aws/signer/v2: Use constant instead of string literal for POST/GET (#635)
Updates the v2 signer to use predefined constants instead of string literals for POST and GET HTTP methods.
1 parent 36e8204 commit c1ad816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws/signer/v2/v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func SignSDKRequest(req *aws.Request) {
5757
return
5858
}
5959

60-
if req.HTTPRequest.Method != "POST" && req.HTTPRequest.Method != "GET" {
60+
if req.HTTPRequest.Method != http.MethodPost && req.HTTPRequest.Method != http.MethodGet {
6161
// The V2 signer only supports GET and POST
6262
req.Error = errInvalidMethod
6363
return

0 commit comments

Comments
 (0)