diff --git a/src/main/java/com/intellectualsites/http/HttpRequest.java b/src/main/java/com/intellectualsites/http/HttpRequest.java index 219f657..532d582 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 || httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_CREATED) { + if (httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_OK && httpURLConnection.getResponseCode() != HttpURLConnection.HTTP_CREATED) { stream = httpURLConnection.getErrorStream(); } else { stream = httpURLConnection.getInputStream();