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

Function send

packages/effect/src/http/HttpClient.ts:721–729  ·  view source on GitHub ↗
(request: HttpClientRequest.HttpClientRequest)

Source from the content-addressed store, hash-verified

719 }
720 const url = urlResult.success
721 const send = (request: HttpClientRequest.HttpClientRequest) =>
722 scope === undefined
723 ? f(request, url, controller.signal, fiber as any)
724 // Register the abort before dispatch, so a scope that is already
725 // closed aborts the signal before the transport sees it
726 : Effect.flatMap(
727 Scope.addFinalizer(scope, Effect.sync(() => controller.abort())),
728 () => f(request, url, controller.signal, fiber as any)
729 )
730 const exchange = (
731 request: HttpClientRequest.HttpClientRequest,
732 onResponse?: (response: HttpClientResponse.HttpClientResponse) => void

Callers 1

exchangeFunction · 0.70

Calls 4

addFinalizerMethod · 0.80
abortMethod · 0.65
fFunction · 0.50
syncMethod · 0.45

Tested by

no test coverage detected