public interface BlockingHttpClient extends BlockingHttpRequester
HttpClient
but with synchronous/blocking APIs instead of asynchronous APIs.Modifier and Type | Method and Description |
---|---|
default BlockingStreamingHttpClient |
asBlockingStreamingClient()
Convert this
BlockingHttpClient to the BlockingStreamingHttpClient API. |
default HttpClient |
asClient()
Convert this
BlockingHttpClient to the HttpClient API. |
StreamingHttpClient |
asStreamingClient()
Convert this
BlockingHttpClient to the StreamingHttpClient API. |
HttpResponse |
request(HttpRequest request)
Send a
request . |
ReservedBlockingHttpConnection |
reserveConnection(HttpExecutionStrategy strategy,
HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData . |
ReservedBlockingHttpConnection |
reserveConnection(HttpRequestMetaData metaData)
Reserve a
BlockingHttpConnection based on provided HttpRequestMetaData . |
close, executionContext, httpResponseFactory, request
connect, delete, get, head, newRequest, options, patch, post, put, trace
closeGracefully
HttpResponse request(HttpRequest request) throws java.lang.Exception
request
.request
- the request to send.java.lang.Exception
- if an exception occurs during the request processing.ReservedBlockingHttpConnection reserveConnection(HttpRequestMetaData metaData) throws java.lang.Exception
BlockingHttpConnection
based on provided HttpRequestMetaData
.metaData
- Allows the underlying layers to know what BlockingHttpConnection
s are valid to
reserve for future requests
with the same HttpRequestMetaData
.
For example this may provide some insight into shard or other info.ReservedBlockingHttpConnection
.java.lang.Exception
- if a exception occurs during the reservation process.ReservedBlockingHttpConnection reserveConnection(HttpExecutionStrategy strategy, HttpRequestMetaData metaData) throws java.lang.Exception
BlockingHttpConnection
based on provided HttpRequestMetaData
.strategy
- HttpExecutionStrategy
to use.metaData
- Allows the underlying layers to know what BlockingHttpConnection
s are valid to
reserve for future requests
with the same HttpRequestMetaData
.
For example this may provide some insight into shard or other info.ReservedBlockingHttpConnection
.java.lang.Exception
- if a exception occurs during the reservation process.StreamingHttpClient asStreamingClient()
BlockingHttpClient
to the StreamingHttpClient
API.StreamingHttpClient
representation of this BlockingHttpClient
.default HttpClient asClient()
BlockingHttpClient
to the HttpClient
API.HttpClient
representation of this BlockingHttpClient
.default BlockingStreamingHttpClient asBlockingStreamingClient()
BlockingHttpClient
to the BlockingStreamingHttpClient
API.BlockingStreamingHttpClient
representation of this BlockingHttpClient
.