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

Function ready

packages/ui/native/src/NativeHttpClient.ts:195–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 const binary = fiber.getRef(ResponseType) === "binary"
194 const exchange = new Exchange(networking, exchangesOf(device))
195 const ready = () => {
196 const head = exchange.head
197 if (head === undefined) {
198 if (exchange.error !== undefined) fail(exchange.error)
199 return
200 }
201 exchange.listeners.delete(ready)
202 resume(Effect.succeed(
203 new Response(
204 request,
205 head[1],
206 Headers.fromInput(head[2] ?? {}),
207 head[3] || url.href.split("#")[0],
208 exchange,
209 binary
210 )
211 ))
212 }
213 exchange.listeners.add(ready)
214 const started = (id: number) => {
215 exchange.start(id)

Callers

nothing calls this directly

Calls 5

failFunction · 0.70
deleteMethod · 0.65
resumeFunction · 0.50
succeedMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected