
feign.ResponseMapper Maven / Gradle / Ivy
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);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy