Skip to main content Link Search Menu Expand Document (external link)

HttpPlatform.ts overview

Since v1.0.0


Exports Grouped by Category


constructors

make

Signature

declare const make: (impl: {
  readonly fileResponse: (
    path: string,
    status: number,
    statusText: string | undefined,
    headers: Headers.Headers,
    start: number,
    end: number | undefined,
    contentLength: number
  ) => ServerResponse.HttpServerResponse
  readonly fileWebResponse: (
    file: Body.HttpBody.FileLike,
    status: number,
    statusText: string | undefined,
    headers: Headers.Headers,
    options?: FileSystem.StreamOptions | undefined
  ) => ServerResponse.HttpServerResponse
}) => Effect.Effect<HttpPlatform, never, FileSystem.FileSystem | Etag.Generator>

Source

Since v1.0.0

layers

layer

Signature

declare const layer: Layer<HttpPlatform, never, FileSystem.FileSystem>

Source

Since v1.0.0

models

HttpPlatform (interface)

Signature

export interface HttpPlatform {
  readonly [TypeId]: TypeId
  readonly fileResponse: (
    path: string,
    options?: ServerResponse.Options.WithContent & FileSystem.StreamOptions
  ) => Effect.Effect<ServerResponse.HttpServerResponse, Error.PlatformError>
  readonly fileWebResponse: (
    file: Body.HttpBody.FileLike,
    options?: ServerResponse.Options.WithContent & FileSystem.StreamOptions
  ) => Effect.Effect<ServerResponse.HttpServerResponse>
}

Source

Since v1.0.0

tags

HttpPlatform

Signature

declare const HttpPlatform: Context.Tag<HttpPlatform, HttpPlatform>

Source

Since v1.0.0

type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0