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

Function fileWebResponse

packages/platform/src/internal/httpPlatform.ts:73–90  ·  view source on GitHub ↗
(file, options)

Source from the content-addressed store, hash-verified

71 )
72 },
73 fileWebResponse(file, options) {
74 return Effect.map(etagGen.fromFileWeb(file), (etag) => {
75 const headers = Headers.merge(
76 options?.headers ? Headers.fromInput(options.headers) : Headers.empty,
77 Headers.unsafeFromRecord({
78 etag: Etag.toString(etag),
79 "last-modified": new Date(file.lastModified).toUTCString()
80 })
81 )
82 return impl.fileWebResponse(
83 file,
84 options?.status ?? 200,
85 options?.statusText,
86 headers,
87 options
88 )
89 })
90 }
91 })
92 })
93

Callers

nothing calls this directly

Calls 4

mergeMethod · 0.80
mapMethod · 0.65
toStringMethod · 0.65
streamMethod · 0.45

Tested by

no test coverage detected