public interface BlockingHttpRequester extends HttpRequestFactory, GracefulAutoCloseable
HttpRequester
with synchronous/blocking APIs instead of asynchronous APIs.Modifier and Type | Method and Description |
---|---|
default void |
close() |
HttpExecutionContext |
executionContext()
Get the
HttpExecutionContext used during construction of this object. |
HttpResponseFactory |
httpResponseFactory()
Get a
HttpResponseFactory . |
HttpResponse |
request(HttpExecutionStrategy strategy,
HttpRequest request)
Send a
request using the passed strategy . |
connect, delete, get, head, newRequest, options, patch, post, put, trace
closeGracefully
HttpResponse request(HttpExecutionStrategy strategy, HttpRequest request) throws java.lang.Exception
request
using the passed strategy
.strategy
- HttpExecutionStrategy
to use.request
- the request to send.java.lang.Exception
- if an exception occurs during the request processing.HttpExecutionContext executionContext()
HttpExecutionContext
used during construction of this object.
Note that the ExecutionContext.ioExecutor()
will not necessarily be associated with a specific thread
unless that was how this object was built.
HttpExecutionContext
used during construction of this object.HttpResponseFactory httpResponseFactory()
HttpResponseFactory
.HttpResponseFactory
.default void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception