io.vertx.ext.web.handler

## Interface ResponseContentTypeHandler

- All Superinterfaces:
    Handler<RoutingContext>

      public interface ResponseContentTypeHandler
      extends Handler<RoutingContext>

  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:
    `RoutingContext.getAcceptableContentType()`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_DISABLE_FLAG`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ResponseContentTypeHandler` | `create()` Create a response content type handler.
    `static ResponseContentTypeHandler` | `create(String disableFlag)` Create a response content type handler with a custom disable flag.

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Field Detail

    - #### DEFAULT_DISABLE_FLAG

          static final String DEFAULT_DISABLE_FLAG

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### 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

Copyright © 2019 Eclipse. All rights reserved.