vertx / io.vertx.ext.web.handler / ResponseContentTypeHandler

# ResponseContentTypeHandler

`interface ResponseContentTypeHandler : 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()

### Properties

DEFAULT_DISABLE_FLAG | `static val DEFAULT_DISABLE_FLAG: String`

### Functions

create | `open static fun create(): ResponseContentTypeHandler` Create a response content type handler. `open static fun create(disableFlag: String): ResponseContentTypeHandler` Create a response content type handler with a custom disable flag.