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

Function fileWebResponse

packages/effect/src/unstable/http/HttpPlatform.ts:117–134  ·  view source on GitHub ↗
(file, options)

Source from the content-addressed store, hash-verified

115 )
116 }),
117 fileWebResponse(file, options) {
118 return Effect.map(etagGen.fromFileWeb(file), (etag) => {
119 const headers = Headers.merge(
120 options?.headers ? Headers.fromInput(options.headers) : Headers.empty,
121 Headers.fromRecordUnsafe({
122 etag: Etag.toString(etag),
123 "last-modified": new Date(file.lastModified).toUTCString()
124 })
125 )
126 return impl.fileWebResponse(
127 file,
128 options?.status ?? 200,
129 options?.statusText,
130 headers,
131 options
132 )
133 })
134 }
135 })
136})
137

Callers

nothing calls this directly

Calls 7

mergeMethod · 0.80
pushMethod · 0.80
toStringMethod · 0.65
pipeMethod · 0.65
streamMethod · 0.65
NumberInterface · 0.50
mapMethod · 0.45

Tested by

no test coverage detected