From 71950f03f36a1607058c9cc6817b7525f37604bf Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Thu, 15 Feb 2024 17:24:22 +0000 Subject: [PATCH] Fix status check --- src/main/java/com/intellectualsites/http/HttpRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();