Package io.vertx.ext.web.handler
Interface ResponseContentTypeHandler
- 
- All Superinterfaces:
 Handler<RoutingContext>,PlatformHandler
public interface ResponseContentTypeHandler extends PlatformHandler
A handler which sets the response content type automatically according to the bestAcceptheader 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 Description static StringDEFAULT_DISABLE_FLAG 
- 
Method Summary
Static Methods Modifier and Type Method Description static ResponseContentTypeHandlercreate()Create a response content type handler.static ResponseContentTypeHandlercreate(String disableFlag)Create a response content type handler with a custom disable flag. 
 - 
 
- 
- 
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
 
 
 - 
 
 -