Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AcceptPreferenceParser

Extracts preferences from the accept-* headers from an incoming HttpRequest. Supports Accept, Accept-Charset, Accept-Encoding, Accept-Language and Accept-DateTime.

Hierarchy

Index

Constructors

constructor

Methods

canHandle

  • canHandle(input: Guarded<IncomingMessage>): Promise<void>
  • Checks if the input data can be handled by this class. Throws an error if it can't handle the data.

    Parameters

    • input: Guarded<IncomingMessage>

      Input data that would be handled potentially.

    Returns Promise<void>

    A promise resolving if this input can be handled, rejecting with an Error if not.

handle

handleSafe

Private parseHeader