#app router outputting plain text
1 messages · Page 1 of 1 (latest)
Hi @onyx ember. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes. In the App Router, create a Route Handler and return a Response with a text content type.
Example (app/hello.txt/route.ts):
export async function GET() {
return new Response('Hello, plain text!', {
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
})
}