MCPcopy
hub / github.com/Effect-TS/effect / text

Function text

packages/platform/src/internal/httpServerResponse.ts:135–147  ·  view source on GitHub ↗
(
  body: string,
  options?: ServerResponse.Options.WithContentType
)

Source from the content-addressed store, hash-verified

133
134/** @internal */
135export const text = (
136 body: string,
137 options?: ServerResponse.Options.WithContentType
138): ServerResponse.HttpServerResponse => {
139 const headers = options?.headers ? Headers.fromInput(options.headers) : Headers.empty
140 return new ServerResponseImpl(
141 options?.status ?? 200,
142 options?.statusText,
143 headers,
144 options?.cookies ?? Cookies.empty,
145 internalBody.text(body, getContentType(options, headers))
146 )
147}
148
149/** @internal */
150export const html: {

Callers 1

htmlFunction · 0.70

Calls 2

getContentTypeFunction · 0.85
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…