Package org.springframework.web.client
Interface ResponseExtractor<T>
- Type Parameters:
T- the data type
- All Known Implementing Classes:
HttpMessageConverterExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Generic callback interface used by
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. There is one available factory method, see
RestTemplate.responseEntityExtractor(Type).
-
Method Summary
Modifier and TypeMethodDescriptionextractData(ClientHttpResponse response) Extract data from the givenClientHttpResponseand return it.
-
Method Details
-
extractData
Extract data from the givenClientHttpResponseand return it.- Parameters:
response- the HTTP response- Returns:
- the extracted data
- Throws:
IOException- in case of I/O errors
-