Yes, you can customize the content type of the responses. You can do this by creating a Response
object with the desired content type and returning it from your route handler.
Here's an example:
import { Response } from '@deepkit/http'; router.get('/', () => { const content = '<h1>Hello World</h1>'; return new Response(content, 'text/plain'); });
In this example, the response will have a Content-Type header of text/plain
instead of the default text/html
.