handle HTTP statuses

This commit is contained in:
Ryan Cavicchioni 2020-03-06 01:28:12 -06:00
parent 43465c6ae9
commit f58f523d35
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -87,7 +87,11 @@ func (c *Client) Request(method, url string, body io.Reader) (*http.Response, er
}
switch resp.StatusCode {
case http.StatusOK, http.StatusAccepted, http.StatusMultiStatus:
case http.StatusOK:
fallthrough
case http.StatusAccepted:
fallthrough
case http.StatusMultiStatus:
return resp, nil
}