Contentful Personalization & Analytics
    Preparing search index...
    FetchMethod: (url: string | URL, init: RequestInit) => Promise<Response>

    Signature of a fetch method used by the API clients.

    Type Declaration

      • (url: string | URL, init: RequestInit): Promise<Response>
      • Parameters

        • url: string | URL

          The request URL.

        • init: RequestInit

          Initialization options passed to fetch.

        Returns Promise<Response>

        A promise that resolves with the Response.

    This abstraction allows the underlying implementation to be replaced, for example in tests or different runtime environments.

    const method: FetchMethod = async (url, init) => {
    return fetch(url, init)
    }