Skip to content

Commit

Permalink
Merge pull request #361 from accurics/bugfix/fix-http-request
Browse files Browse the repository at this point in the history
fix send request method, previously hardcoded
  • Loading branch information
Cesar Rodriguez authored Oct 22, 2020
2 parents 222bd31 + 8d4bad1 commit 935e3b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func SendRequest(method, url, token string, data []byte) (*http.Response, error)
var resp *http.Response

// new http request
req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
req, err := http.NewRequest(method, url, bytes.NewBuffer(data))
if err != nil {
zap.S().Errorf("failed to create http request; method: '%v', url: '%v'")
return resp, errNewRequest
Expand Down

0 comments on commit 935e3b0

Please sign in to comment.