From d64cddf3a7cb62c7dd13650c31aefd6b58e9eed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=9E?= Date: Sat, 23 Nov 2024 20:59:36 +0800 Subject: [PATCH] Update HttpClient.java --- rxlib/src/main/java/org/rx/net/http/HttpClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rxlib/src/main/java/org/rx/net/http/HttpClient.java b/rxlib/src/main/java/org/rx/net/http/HttpClient.java index fa1862fe..db03acd4 100644 --- a/rxlib/src/main/java/org/rx/net/http/HttpClient.java +++ b/rxlib/src/main/java/org/rx/net/http/HttpClient.java @@ -638,9 +638,9 @@ public RequestBody toBody() { } //todo get request body -// boolean isGet = Strings.equalsIgnoreCase(servletRequest.getMethod(), HttpMethod.GET.name()); -// ResponseContent resContent = new ResponseContent(getClient().newCall(createRequest(forwardUrl).method(servletRequest.getMethod(), isGet ? null : reqContent.toBody()).build()).execute()); - ResponseContent resContent = new ResponseContent(getClient().newCall(createRequest(forwardUrl).method(servletRequest.getMethod(), reqContent.toBody()).build()).execute()); + boolean isGet = Strings.equalsIgnoreCase(servletRequest.getMethod(), HttpMethod.GET.name()); + ResponseContent resContent = new ResponseContent(getClient().newCall(createRequest(forwardUrl).method(servletRequest.getMethod(), isGet ? null : reqContent.toBody()).build()).execute()); +// ResponseContent resContent = new ResponseContent(getClient().newCall(createRequest(forwardUrl).method(servletRequest.getMethod(), reqContent.toBody()).build()).execute()); resContent.cachingStream = (featureFlags & CACHING_STREAM_FLAG) == CACHING_STREAM_FLAG; servletResponse.setStatus(resContent.response.code()); for (Pair header : resContent.responseHeaders()) {