public interface ResponseExtractor<T>
RestTemplate
's retrieval methods
Implementations of this interface perform the actual work of extracting data
from a ClientHttpResponse
, but don't need to worry about exception
handling or closing resources.
Used internally by the RestTemplate
, but also useful for application code.
Modifier and Type | Method and Description |
---|---|
T |
extractData(ClientHttpResponse response)
Extract data from the given
ClientHttpResponse and return it. |
T extractData(ClientHttpResponse response) throws java.io.IOException
ClientHttpResponse
and return it.response
- the HTTP responsejava.io.IOException
- in case of I/O errors