WithUnlinkedURL()

This commit is contained in:
Ian Gulliver
2021-09-13 00:11:30 +00:00
parent 910d636b92
commit 32823d8d10
2 changed files with 50 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ func (c *Client) get(path string, values *url.Values, out interface{}) error {
if err != nil {
return err
}
defer resp.Body.Close()
dec := json.NewDecoder(resp.Body)
@@ -131,6 +132,7 @@ func (c *Client) post(path string, body interface{}, out interface{}) error {
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
body, err := ioutil.ReadAll(resp.Body)