Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates a Conditions object based on the the following headers:

  • If-Modified-Since
  • If-Unmodified-Since
  • If-Match
  • If-None-Match

Implementation based on RFC7232

Hierarchy

Index

Constructors

Properties

logger: Logger = ...

Methods

  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    • input: HttpRequest

      Input that could potentially be handled.

    Returns Promise<void>

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

  • parseDateHeader(request: HttpRequest, header: "if-modified-since" | "if-unmodified-since"): undefined | Date
  • parseTagHeader(request: HttpRequest, header: "if-match" | "if-none-match"): undefined | string[]