Package io.servicetalk.http.api
Interface BlockingHttpRequester
- All Superinterfaces:
AutoCloseable
,GracefulAutoCloseable
,HttpRequestFactory
- All Known Subinterfaces:
BlockingHttpClient
,BlockingHttpConnection
,ReservedBlockingHttpConnection
The equivalent of
HttpRequester
with synchronous/blocking APIs instead of asynchronous APIs.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Get theHttpExecutionContext
used during construction of this object.Get aHttpResponseFactory
.request
(HttpRequest request) Send arequest
.Methods inherited from interface io.servicetalk.concurrent.GracefulAutoCloseable
closeGracefully
-
Method Details
-
request
Send arequest
.- Parameters:
request
- the request to send.- Returns:
- The response.
- Throws:
Exception
-
executionContext
HttpExecutionContext executionContext()Get theHttpExecutionContext
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.- Returns:
- the
HttpExecutionContext
used during construction of this object.
-
httpResponseFactory
HttpResponseFactory httpResponseFactory()Get aHttpResponseFactory
.- Returns:
- a
HttpResponseFactory
.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-