package feign; import java.lang.reflect.Type; /** * Map function to apply to the response before decoding it. * *
{@code
* new ResponseMapper() {
* @Override
* public Response map(Response response, Type type) {
* try {
* return response
* .toBuilder()
* .body(Util.toString(response.body().asReader()).toUpperCase().getBytes())
* .build();
* } catch (IOException e) {
* throw new RuntimeException(e);
* }
* }
* };
* }
*/
public interface ResponseMapper {
Response map(Response response, Type type);
}