summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http.go b/src/http.go
index bd06342..8243500 100644
--- a/src/http.go
+++ b/src/http.go
@@ -160,7 +160,7 @@ func HTTPMethodWithOpts(method string, url string, opts *HTTPOptionalParams) (ht
return resp.Header, nil, &HTTPReadError{URL: url, Err: readErr}
}
- if resp.StatusCode != 200 {
+ if resp.StatusCode < 200 || resp.StatusCode > 299 {
return resp.Header, body, &HTTPStatusError{URL: url, Status: resp.StatusCode}
}