Package feign

Interface ResponseMapper


  • public interface ResponseMapper
    Map function to apply to the response before decoding it.
     
     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);
              }
          }
      };