mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 10:34:27 +00:00
F
This commit is contained in:
@@ -3,7 +3,7 @@ package client
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -123,7 +123,9 @@ func (client *Client) Call(service, endpoint string, request, response interface
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(string(body))
|
||||
if !(resp.StatusCode >= 200 && resp.StatusCode < 300) {
|
||||
return errors.New(string(body))
|
||||
}
|
||||
return unmarshalResponse(body, response)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user