A RepresentationConverter that ensures a representation for a certain content type is available.

Representations of the same content type are served as is; others are replaced by a constant document.

This can for example be used to serve an index.html file, which could then interactively load another representation.

Options default to the most permissive values when not defined.

Hierarchy

Constructors

Properties

contentType: string
filePath: string
options: Required<ConstantConverterOptions>

Methods