ThemeParks.wiki Parks API - v2.0.0
    Preparing search index...

    Type Alias HttpCacheHit

    A request answered from the HTTP cache, as reported to the observer set with setHttpCacheObserver(). The transport (see httpProxy.ts) never sees such a request, so a consumer that records every response listens here for the rest.

    type HttpCacheHit = {
        body: string;
        caller: HttpCaller;
        expiresAt?: number;
        request: {
            body?: HttpRequestBody;
            headers: Record<string, string>;
            method: string;
            url: string;
        };
    }
    Index
    body: string

    The cached response text

    caller: HttpCaller

    Who makes the request

    expiresAt?: number

    When the cache entry expires, as a millisecond timestamp. Missing when the entry expired while the hit was served, or the lookup failed.

    request: {
        body?: HttpRequestBody;
        headers: Record<string, string>;
        method: string;
        url: string;
    }

    The request as the transport would have received it, without proxyUrl, cert, key and timeoutMs. It carries secrets all the same, see setHttpCacheObserver.

    Type Declaration

    • Optionalbody?: HttpRequestBody

      The body encoded as it is sent, an object as JSON

    • headers: Record<string, string>
    • method: string
    • url: string