java.lang.Object
ru.vyarus.dropwizard.guice.test.client.builder.util.VoidBodyReader
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<Void>

@Provider @Consumes public class VoidBodyReader extends Object implements jakarta.ws.rs.ext.MessageBodyReader<Void>
In theory, response.readEntity(Void.class) should completely ignore response content (if present), but, actually jersey throws no mapper found error. This mapper should be used as a workaround: to completely ignore the response body.
Since:
17.09.2025
See Also:
  • Constructor Details

    • VoidBodyReader

      public VoidBodyReader()
  • Method Details

    • isReadable

      public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<Void>
    • readFrom

      public Void readFrom(Class<Void> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<Void>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException