Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

Properties

Private Readonly contentType

contentType: string

Private Readonly filePath

filePath: string

Private Readonly options

options: Required<ConstantConverterOptions>

Methods

canHandle

handle

handleSafe