Class PrettyPrintFilter

java.lang.Object
alpine.server.filters.PrettyPrintFilter
All Implemented Interfaces:
javax.ws.rs.container.ContainerResponseFilter

@Provider public class PrettyPrintFilter extends Object implements javax.ws.rs.container.ContainerResponseFilter
Adds the ability to optionally output pretty printed responses. Requests containing a 'pretty' parameter in the query string will have formatted responses (if a response body is sent). Example: http://hostname/api/version?pretty
Since:
1.0.0
Author:
Steve Springett
  • Constructor Details

    • PrettyPrintFilter

      public PrettyPrintFilter()
  • Method Details

    • filter

      public void filter(javax.ws.rs.container.ContainerRequestContext reqCtx, javax.ws.rs.container.ContainerResponseContext respCtx) throws IOException
      Specified by:
      filter in interface javax.ws.rs.container.ContainerResponseFilter
      Throws:
      IOException