MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeFetch

Function makeFetch

packages/effect/test/http/FetchHttpClient.test.ts:8–10  ·  view source on GitHub ↗
(
  fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
)

Source from the content-addressed store, hash-verified

6const NativeRequest = globalThis.Request
7
8const makeFetch = (
9 fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
10): typeof globalThis.fetch => Object.assign(fetch, { preconnect: () => {} })
11
12// Model browsers that stringify stream bodies and never read the duplex option,
13// then load a fresh module so support is detected against the stub.

Callers 2

stubFetchFunction · 0.85

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected