Standard implementation of ETagHandler. ETags are constructed by combining the last modified date with the content type of the representation.

Hierarchy

  • BasicETagHandler

Implements

Constructors

Methods

  • Validates whether the given metadata corresponds to the given ETag.

    Parameters

    • metadata: RepresentationMetadata

      Metadata of the resource.

    • eTag: string

      ETag to compare to.

    • strict: boolean

      True if the comparison needs to be on representation level. False if it is on resource level and the content-type doesn't matter.

    Returns boolean

  • Validates whether 2 ETags correspond to the same state of a resource, independent of the representation the ETags correspond to.

    Parameters

    • eTag1: string

      First ETag to compare.

    • eTag2: string

      Second ETag to compare.

    Returns boolean