Package io.servicetalk.http.api
Interface HttpRequester
-
- All Superinterfaces:
AsyncCloseable
,HttpRequestFactory
,ListenableAsyncCloseable
- All Known Subinterfaces:
HttpClient
,HttpConnection
,ReservedHttpConnection
public interface HttpRequester extends HttpRequestFactory, ListenableAsyncCloseable
Provides a means to make a HTTP request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpExecutionContext
executionContext()
Get theHttpExecutionContext
used during construction of this object.HttpResponseFactory
httpResponseFactory()
Get aHttpResponseFactory
.Single<HttpResponse>
request(HttpExecutionStrategy strategy, HttpRequest request)
Send arequest
using the specifiedstrategy
.-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
-
Methods inherited from interface io.servicetalk.http.api.HttpRequestFactory
connect, delete, get, head, newRequest, options, patch, post, put, trace
-
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose
-
-
-
-
Method Detail
-
request
Single<HttpResponse> request(HttpExecutionStrategy strategy, HttpRequest request)
Send arequest
using the specifiedstrategy
.- Parameters:
strategy
-HttpExecutionStrategy
to use for executing the request.request
- the request to send.- Returns:
- The response.
-
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
.
-
-