MCPcopy Create free account
hub / github.com/TanStack/query / writeHtml

Function writeHtml

examples/lit/ssr/server/index.mjs:111–120  ·  view source on GitHub ↗
(res, statusCode, body, extraHeaders = {})

Source from the content-addressed store, hash-verified

109}
110
111function writeHtml(res, statusCode, body, extraHeaders = {}) {
112 const payload = Buffer.from(body)
113 writeBuffer(
114 res,
115 statusCode,
116 'text/html; charset=utf-8',
117 payload,
118 extraHeaders,
119 )
120}
121
122function writeJson(res, statusCode, body) {
123 const payload = Buffer.from(JSON.stringify(body))

Callers 2

renderPageFunction · 0.85
index.mjsFile · 0.85

Calls 1

writeBufferFunction · 0.85

Tested by

no test coverage detected