Package org.springframework.http.client
Interface AsyncClientHttpRequest
- All Superinterfaces:
HttpMessage
,HttpOutputMessage
,HttpRequest
- All Known Implementing Classes:
MockAsyncClientHttpRequest
public interface AsyncClientHttpRequest extends HttpRequest, HttpOutputMessage
Represents a client-side asynchronous HTTP request. Created via an implementation of theAsyncClientHttpRequestFactory
.A
AsyncHttpRequest
can be executed, getting a futureClientHttpResponse
which can be read from.- Since:
- 4.0
- Author:
- Arjen Poutsma
- See Also:
AsyncClientHttpRequestFactory.createAsyncRequest(java.net.URI, org.springframework.http.HttpMethod)
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListenableFuture<ClientHttpResponse>
executeAsync()
Execute this request asynchronously, resulting in a Future handle.Methods inherited from interface org.springframework.http.HttpMessage
getHeaders
Methods inherited from interface org.springframework.http.HttpOutputMessage
getBody
Methods inherited from interface org.springframework.http.HttpRequest
getMethod, getURI
Method Detail
executeAsync
ListenableFuture<ClientHttpResponse> executeAsync() throws IOException
Execute this request asynchronously, resulting in a Future handle.ClientHttpResponse
that can be read.- Returns:
- the future response result of the execution
- Throws:
IOException
- in case of I/O errors