MCPcopy Index your code
hub / github.com/Effect-TS/effect / fileWebResponse

Function fileWebResponse

packages/platform-node/src/internal/httpPlatform.ts:26–38  ·  view source on GitHub ↗
(file, status, statusText, headers, _options)

Source from the content-addressed store, hash-verified

24 })
25 },
26 fileWebResponse(file, status, statusText, headers, _options) {
27 return ServerResponse.raw(Readable.fromWeb(file.stream() as any), {
28 headers: Headers.merge(
29 headers,
30 Headers.unsafeFromRecord({
31 "content-type": headers["content-type"] ?? Mime.getType(file.name) ?? "application/octet-stream",
32 "content-length": file.size.toString()
33 })
34 ),
35 status,
36 statusText
37 })
38 }
39})
40
41/** @internal */

Callers

nothing calls this directly

Calls 4

rawMethod · 0.80
mergeMethod · 0.80
toStringMethod · 0.65
streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…