http method fix

This commit is contained in:
boufni95 2024-12-06 16:53:34 +00:00
parent fa92c325dd
commit 9dd77fe0bf
6 changed files with 13 additions and 5 deletions

View file

@ -1087,7 +1087,14 @@ func NewClient(params ClientParams) *Client {
return nil, err
}
finalRoute := "/api/user/offer/get"
resBody, err := doGetRequest(params.BaseURL+finalRoute, auth)
body, err := json.Marshal(req)
if err != nil {
return nil, err
}
resBody, err := doPostRequest(params.BaseURL+finalRoute, body, auth)
if err != nil {
return nil, err
}
result := ResultError{}
err = json.Unmarshal(resBody, &result)
if err != nil {