diff --git a/src/main/java/com/intellectualsites/http/HttpRequest.java b/src/main/java/com/intellectualsites/http/HttpRequest.java index 3934c92..219f657 100644 --- a/src/main/java/com/intellectualsites/http/HttpRequest.java +++ b/src/main/java/com/intellectualsites/http/HttpRequest.java @@ -122,7 +122,7 @@ static Builder newBuilder() { final InputStream stream; if (this.method.hasBody()) { - if (httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_OK) { + if (httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_OK || httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_CREATED) { stream = httpURLConnection.getErrorStream(); } else { stream = httpURLConnection.getInputStream();