Interface ResponseContentTypeHandler

All Superinterfaces:
Handler<RoutingContext>, PlatformHandler

public interface ResponseContentTypeHandler extends PlatformHandler
A handler which sets the response content type automatically according to the best Accept header match. The header is set only if:
  • no object is stored in the routing context under the name DEFAULT_DISABLE_FLAG
  • a match is found
  • the header is not present already
  • content length header is absent or set to something different than zero
Author:
Thomas Segismont
See Also:
  • Field Details

  • Method Details

    • create

      static ResponseContentTypeHandler create()
      Create a response content type handler.
      Returns:
      the response content type handler
    • create

      static ResponseContentTypeHandler create(String disableFlag)
      Create a response content type handler with a custom disable flag.
      Returns:
      the response content type handler