ChemPal Documentation - v1.6.0
    Preparing search index...

    Module utils/fetchDecorator

    Functions - Utils

    generateRequestHash

    Generates a deterministic hash for an HTTP request based on its URL, method, headers, body, and content type. Two requests with identical parameters will always produce the same hash, making this suitable for cache keying and request deduplication.

    fetchDecorator

    A lightweight fetch wrapper that automatically parses response bodies based on their Content-Type header and attaches a deterministic request hash to each response. Supports JSON, text, and binary (blob) content types.