HttpPlatform
Constructors
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,
) => ServerResponse.HttpServerResponse;
}) => Effect.Effect<HttpPlatform, never, FileSystem.FileSystem | Etag.Generator>;Layers
Models
HttpPlatform interface
Added in v1.0.0
Source
Signature
interface HttpPlatform {
readonly [TypeId]: typeof TypeId;
readonly fileResponse: (
path: string,
options?: WithContent & StreamOptions,
) => Effect<HttpServerResponse, PlatformError>;
readonly fileWebResponse: (
file: FileLike,
options?: WithContent & StreamOptions,
) => Effect<HttpServerResponse>;
}