public static NettyHttpClientResponse executeRequest(
FullHttpRequest request, int port, long incompleteCallTimeoutMillis, Consumer<ChannelPipeline> pipelineAdjuster
) throws InterruptedException, TimeoutException, ExecutionException {
Bootstrap bootstrap = createNettyHttpClientBootstrap();
try {
Channel ch = connectNettyHttpClientToLocalServer(bootstrap, port);
try {
return executeNettyHttpClientCall(ch, request, incompleteCallTimeoutMillis, pipelineAdjuster);
}
finally {
ch.close();
}
} finally {
bootstrap.group().shutdownGracefully();
}
}