writeHtmlResponse() — astro Function Reference
Architecture documentation for the writeHtmlResponse() function in response.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b0b80fd6_882e_1ae8_0437_067b6f956964["writeHtmlResponse()"] 4611d913_9978_903f_46fc_e5961ccf4da7["response.ts"] b0b80fd6_882e_1ae8_0437_067b6f956964 -->|defined in| 4611d913_9978_903f_46fc_e5961ccf4da7 1616454b_deab_c423_181c_953c5080c0e8["handle500Response()"] 1616454b_deab_c423_181c_953c5080c0e8 -->|calls| b0b80fd6_882e_1ae8_0437_067b6f956964 style b0b80fd6_882e_1ae8_0437_067b6f956964 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-astro-server/response.ts lines 30–37
export function writeHtmlResponse(res: http.ServerResponse, statusCode: number, html: string) {
res.writeHead(statusCode, {
'Content-Type': 'text/html',
'Content-Length': Buffer.byteLength(html, 'utf-8'),
});
res.write(html);
res.end();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does writeHtmlResponse() do?
writeHtmlResponse() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-astro-server/response.ts.
Where is writeHtmlResponse() defined?
writeHtmlResponse() is defined in packages/astro/src/vite-plugin-astro-server/response.ts at line 30.
What calls writeHtmlResponse()?
writeHtmlResponse() is called by 1 function(s): handle500Response.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free