The conditions of an HTTP conditional request.

interface Conditions {
    matchesETag?: string[];
    matchesMetadata: ((metadata?: RepresentationMetadata, strict?: boolean) => boolean);
    modifiedSince?: Date;
    notMatchesETag?: string[];
    unmodifiedSince?: Date;
}

Implemented by

Properties

matchesETag?: string[]

Valid if matching any of the given ETags.

matchesMetadata: ((metadata?: RepresentationMetadata, strict?: boolean) => boolean)

Checks validity based on the given metadata.

Type declaration

    • (metadata?, strict?): boolean
    • Parameters

      • Optionalmetadata: RepresentationMetadata

        Metadata of the representation. Undefined if the resource does not exist.

      • Optionalstrict: boolean

        How to compare the ETag related headers. If true, the comparison will happen on representation level. If false, the comparison happens on resource level, ignoring the content-type.

      Returns boolean

modifiedSince?: Date

Valid if modified since the given date.

notMatchesETag?: string[]

Valid if not matching any of the given ETags.

unmodifiedSince?: Date

Valid if not modified since the given date.