MCP TypeScript SDK
    Preparing search index...

    Function createFetchWithInit

    • Creates a fetch function that includes base RequestInit options. This ensures requests inherit settings like credentials, mode, headers, etc. from the base init.

      Parameters

      • baseFetch: FetchLike = fetch

        The base fetch function to wrap (defaults to global fetch)

      • OptionalbaseInit: RequestInit

        The base RequestInit to merge with each request

      Returns FetchLike

      A wrapped fetch function that merges base options with call-specific options