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

Function empty

packages/effect/src/unstable/http/HttpServerResponse.ts:122–130  ·  view source on GitHub ↗
(
  options?: Options.WithContent | undefined
)

Source from the content-addressed store, hash-verified

120 * @since 4.0.0
121 */
122export const empty = (
123 options?: Options.WithContent | undefined
124): HttpServerResponse =>
125 makeResponse({
126 status: options?.status ?? 204,
127 statusText: options?.statusText,
128 headers: options?.headers ? Headers.fromInput(options.headers) : undefined,
129 cookies: options?.cookies
130 })
131
132/**
133 * Creates a redirect response with a `Location` header.

Callers 1

fromWebFunction · 0.70

Calls 1

makeResponseFunction · 0.70

Tested by

no test coverage detected