Skip to content

Commit

Permalink
Update apirequest.go
Browse files Browse the repository at this point in the history
  • Loading branch information
hosysy authored Jul 2, 2021
1 parent 79ad50b commit 9c9f1d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apirequest/apirequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func (a *APIRequest) GET(resource string, params map[string]string, customStruct
// Request
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return errFailedToClientRequest
}

Expand Down Expand Up @@ -208,6 +209,7 @@ func (a *APIRequest) Request(method string, resource string, params interface{},
// Convert to json string
jsonString, err := json.Marshal(params)
if err != nil {
fmt.Println(err)
return errFailedToConvertJSON
}

Expand All @@ -224,6 +226,7 @@ func (a *APIRequest) Request(method string, resource string, params interface{},
// Request
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return errFailedToClientRequest
}

Expand Down

0 comments on commit 9c9f1d2

Please sign in to comment.