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

HttpPlatform overview

Added in v1.0.0


Table of contents


constructors

make

Signature

export 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>

Added in v1.0.0

layers

layer

Signature

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

Added in 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>
}

Added in v1.0.0

tags

HttpPlatform

Signature

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

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0