Package org.springframework.web.client
Interface AsyncRequestCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @Deprecated public interface AsyncRequestCallback
Deprecated.as of Spring 5.0, in favor ofExchangeFilterFunction
Callback interface for code that operates on anAsyncClientHttpRequest
. Allows to manipulate the request headers, and write to the request body.Used internally by the
AsyncRestTemplate
, but also useful for application code.
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
doWithRequest(AsyncClientHttpRequest request)
Deprecated.
Method Detail
doWithRequest
void doWithRequest(AsyncClientHttpRequest request) throws IOException
Deprecated.Gets called byAsyncRestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.AsyncRequestCallback, org.springframework.web.client.ResponseExtractor<T>, java.lang.Object...)
with an openedClientHttpRequest
. Does not need to care about closing the request or about handling errors: this will all be handled by theRestTemplate
.- Parameters:
request
- the active HTTP request- Throws:
IOException
- in case of I/O errors