Refactor based on goreportcard.com
This commit is contained in:
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
func makeRequest(requestType string, url string, reqBody []byte) (*http.Response, []byte, error) {
|
||||
req, err := http.NewRequest(requestType, Config.API_Url + url, bytes.NewBuffer(reqBody))
|
||||
req, err := http.NewRequest(requestType, Config.APIUrl + url, bytes.NewBuffer(reqBody))
|
||||
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("X-Cachet-Token", Config.API_Token)
|
||||
req.Header.Set("X-Cachet-Token", Config.APIToken)
|
||||
|
||||
client := &http.Client{}
|
||||
res, err := client.Do(req)
|
||||
|
||||
Reference in New Issue
Block a user