Is there a way to access headers in a method that is typed with Express.Request
?
Here's an example code snippet:
private _onTokenReceived(req: Express.Request, res: Express.Response): void {
const header: string = req.headers.authorization;
}
Unfortunately, in my example, I am unable to reach the headers.
Error: The "headers" property does not exist for the "Request" type.ts(2339)