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

Function raw

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

Source from the content-addressed store, hash-verified

402 * @since 4.0.0
403 */
404export const raw = (
405 body: unknown,
406 options?: Options | undefined
407): HttpServerResponse =>
408 makeResponse({
409 status: options?.status ?? 200,
410 statusText: options?.statusText,
411 headers: options?.headers && Headers.fromInput(options.headers),
412 cookies: options?.cookies,
413 body: Body.raw(body, {
414 contentType: options?.contentType,
415 contentLength: options?.contentLength
416 })
417 })
418
419/**
420 * Creates a response whose body is a Web `FormData` value.

Callers

nothing calls this directly

Calls 2

rawMethod · 0.80
makeResponseFunction · 0.70

Tested by

no test coverage detected