Interface RestClient.RequestHeadersspec.RequiredValueExchangeFunction<T>
- Type Parameters:
T- the type the response will be transformed to
- All superinterfaces:
RestClient.RequestHeadersspec.ExchangeFunction<@NonNull 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.RequiredValueExchangeFunction<T>
extends RestClient.RequestHeadersspec.ExchangeFunction<@NonNull T>
Variant of
RestClient.RequestHeadersspec.ExchangeFunction returning a non-null required value.- since:
- 6.2.6
- 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.- specified by:
exchange in interface RestClient.RequestHeadersspec.ExchangeFunction<T>- Parameters:
clientRequest- the requestclientResponse- the response- Returns:
- the exchanged value, never
null - Throws:
IOException- in case of I/O errors
-