, you can access and manipulate headers using the request.headers
property. The request.headers
object provides access to the HTTP headers sent by the client in the request. You can read and modify individual headers using dot notation or bracket notation. For example:
import { HttpRequest } from '@deepkit/http'; router.get('/', (request: HttpRequest) => { const userAgent = request.headers['user-agent']; request.headers['content-type'] = 'application/json'; });