output
    Preparing search index...

    Function fetch

    • A fetch compliant function, that wraps undici's fetch.

      Behaves the same as any fetch function except:

      • Sets a request header called x-request--trace-id with a random UUID;
      • Sends the request, response, error and/or failure to the Trace system;

      Parameters

      • input: RequestInfo | Request

        URL string, URL object or Request object (undici's or Node's)

      • Optionalinit: RequestInit

        Request options

      Returns Promise<Response>

      The HTTP response