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

Function fileWeb

packages/effect/src/unstable/http/HttpServerResponse.ts:507–517  ·  view source on GitHub ↗
(
  file: Body.HttpBody.FileLike,
  options?:
    | (Options.WithContent & {
      readonly bytesToRead?: FileSystem.SizeInput | undefined
      readonly chunkSize?: FileSystem.SizeInput | undefined
      readonly offset?: FileSystem.SizeInput | undefined
    })
    | undefined
)

Source from the content-addressed store, hash-verified

505 * @since 4.0.0
506 */
507export const fileWeb = (
508 file: Body.HttpBody.FileLike,
509 options?:
510 | (Options.WithContent & {
511 readonly bytesToRead?: FileSystem.SizeInput | undefined
512 readonly chunkSize?: FileSystem.SizeInput | undefined
513 readonly offset?: FileSystem.SizeInput | undefined
514 })
515 | undefined
516): Effect.Effect<HttpServerResponse, never, HttpPlatform> =>
517 Effect.flatMap(HttpPlatformKey, (platform) => platform.fileWebResponse(file, options))
518
519/**
520 * Returns a response with the specified header set to the supplied value.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected