- Type Parameters:
T- the type the response will be transformed to
- All Known subinterfaces:
RestClient.RequestHeadersspec.RequiredValueExchangeFunction<T>
- Enclosing interface:
RestClient.RequestHeadersspec<s extends RestClient.RequestHeadersspec<s>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface RestClient.RequestHeadersspec.ExchangeFunction<T extends @Nullable Object>
Defines the contract for
RestClient.RequestHeadersspec.exchange(ExchangeFunction).- since:
- 6.1
- Author:
- Arjen Poutsma, sebastien Deleuze
-
Method summary
Modifier and TypeMethodDescriptionexchange(HttpRequest clientRequest, RestClient.RequestHeadersspec.ConvertibleClientHttpResponse clientResponse) Exchange the given response into a value of typeT.
-
Method Details
-
exchange
T exchange(HttpRequest clientRequest, RestClient.RequestHeadersspec.ConvertibleClientHttpResponse clientResponse) throws IOException Exchange the given response into a value of typeT.- Parameters:
clientRequest- the requestclientResponse- the response- Returns:
- the exchanged value, potentially
null - Throws:
IOException- in case of I/O errors
-