PayFanout API reference
    Preparing search index...

    Function requestWithTimeout

    • Performs one fetch exchange — request, response headers, AND body read — under a single abort timer, so a hung PSP connection can never hang the host's request handler. Any failure (abort or network) is mapped through onFailure; an HTTP error status is NOT a failure here — the caller maps response.ok itself.

      Parameters

      Returns Promise<{ response: Response; text: string }>