use of org.asynchttpclient.request.body.generator.UnboundedQueueFeedableBodyGenerator in project async-http-client by AsyncHttpClient.
the class ChunkingTest method doTestWithFeedableBodyGenerator.
public void doTestWithFeedableBodyGenerator(InputStream is) throws Throwable {
try (AsyncHttpClient c = asyncHttpClient(httpClientBuilder())) {
final FeedableBodyGenerator feedableBodyGenerator = new UnboundedQueueFeedableBodyGenerator();
Request r = post(getTargetUrl()).setBody(feedableBodyGenerator).build();
ListenableFuture<Response> responseFuture = c.executeRequest(r);
feed(feedableBodyGenerator, is);
waitForAndAssertResponse(responseFuture);
}
}
Aggregations