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

Function raw

packages/effect/src/http/HttpServerResponse.ts:428–441  ·  view source on GitHub ↗
(
  body: unknown,
  options?: Options | undefined
)

Source from the content-addressed store, hash-verified

426 * @since 4.0.0
427 */
428export const raw = (
429 body: unknown,
430 options?: Options | undefined
431): HttpServerResponse =>
432 makeResponse({
433 status: options?.status ?? 200,
434 statusText: options?.statusText,
435 headers: options?.headers && Headers.fromInput(options.headers),
436 cookies: options?.cookies,
437 body: Body.raw(body, {
438 contentType: options?.contentType,
439 contentLength: options?.contentLength
440 })
441 })
442
443/**
444 * Creates a response whose body is a Web `FormData` value.

Callers

nothing calls this directly

Calls 2

makeResponseFunction · 0.70
rawMethod · 0.45

Tested by

no test coverage detected