Skip to content

Commit 5428cc4

Browse files
authored
fix 202 in http valid response (#178)
1 parent 189c56e commit 5428cc4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

client.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,10 @@ func (c *Client) doRawRequest(req *http.Request, emptyResponse bool) (io.ReadClo
372372

373373
func unexpectedHttpStatusCode(statusCode int) bool {
374374
switch statusCode {
375-
case http.StatusOK:
376-
return false
377-
case http.StatusCreated:
378-
return false
379-
case http.StatusNoContent:
375+
case http.StatusOK,
376+
http.StatusCreated,
377+
http.StatusNoContent,
378+
http.StatusAccepted:
380379
return false
381380
default:
382381
return true

0 commit comments

Comments
 (0)