public interface HttpClient extends HttpRequester, GracefulAutoCloseable
HttpConnection instances and distribute calls to request(HttpRequest) amongst this collection.executionContext, httpResponseFactory, requestSingle<HttpResponse> request(HttpRequest request)
request.request in interface HttpRequesterrequest - the request to send.Single<ReservedHttpConnection> reserveConnection(HttpRequestMetaData metaData)
HttpConnection based on provided HttpRequestMetaData.metaData - Allows the underlying layers to know what HttpConnections are valid to
reserve for future requests with the same HttpRequestMetaData.
For example this may provide some insight into shard or other info.Single that provides the ReservedHttpConnection upon completion.@Deprecated default Single<ReservedHttpConnection> reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData)
reserveConnection(HttpRequestMetaData). If an HttpExecutionStrategy needs to be
altered, provide a value for HttpContextKeys.HTTP_EXECUTION_STRATEGY_KEY in the
request context.HttpConnection based on provided HttpRequestMetaData.
Note: reserved connections may not be restricted by the max pipelined requests count.
strategy - HttpExecutionStrategy to use.metaData - Allows the underlying layers to know what HttpConnections are valid to
reserve for future requests with the same HttpRequestMetaData.
For example this may provide some insight into shard or other info.Single that provides the ReservedHttpConnection upon completion.StreamingHttpClient asStreamingClient()
HttpClient to the StreamingHttpClient API.StreamingHttpClient representation of this HttpClient.default BlockingStreamingHttpClient asBlockingStreamingClient()
HttpClient to the BlockingStreamingHttpClient API.BlockingStreamingHttpClient representation of this HttpClient.default BlockingHttpClient asBlockingClient()
HttpClient to the BlockingHttpClient API.BlockingHttpClient representation of this HttpClient.default void close()
throws Exception
close in interface AutoCloseableExceptiondefault void closeGracefully()
throws Exception
closeGracefully in interface GracefulAutoCloseableException