Skip to content

Commit

Permalink
Fix status check
Browse files Browse the repository at this point in the history
  • Loading branch information
heychazza authored Feb 15, 2024
1 parent 46db9c8 commit 71950f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/intellectualsites/http/HttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 71950f0

Please sign in to comment.