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>
Since v1.0.0
layers
layer
Signature
declare const layer: Layer<HttpPlatform, never, FileSystem.FileSystem>
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>
}
Since v1.0.0
tags
HttpPlatform
Signature
declare const HttpPlatform: Context.Tag<HttpPlatform, HttpPlatform>
Since v1.0.0
type ids
TypeId
Signature
declare const TypeId: unique symbol
Since v1.0.0
TypeId (type alias)
Signature
type TypeId = typeof TypeId
Since v1.0.0