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

Function writeHtml

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

Source from the content-addressed store, hash-verified

105}
106
107function writeHtml(res, statusCode, body, extraHeaders = {}) {
108 const payload = Buffer.from(body)
109 writeBuffer(
110 res,
111 statusCode,
112 'text/html; charset=utf-8',
113 payload,
114 extraHeaders,
115 )
116}
117
118function writeJson(res, statusCode, body) {
119 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