Skip to content

Commit 25b2882

Browse files
committed
HTTPClient: Fix for body not being included in request
1 parent 0561c12 commit 25b2882

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/src/main/java/org/threadly/litesockets/client/http/HTTPClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ public ListenableFuture<HTTPResponseData> requestAsync(final URL url, final HTTP
291291
HTTPRequestBuilder hrb = new HTTPRequestBuilder(url);
292292
hrb.setRequestType(rt);
293293
hrb.setTimeout(this.defaultTimeoutMS, TimeUnit.MILLISECONDS);
294+
if (bb != null && bb.hasRemaining()) {
295+
hrb.setBody(bb);
296+
}
294297
return requestAsync(hrb.buildClientHTTPRequest());
295298
}
296299

0 commit comments

Comments
 (0)