I am learning nest.js and I am having a hard time setting the response headers..
Here is the code snip
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
//@get('users')
@Get()
@Header('Content-Type','text/html')
getHello(): string {
console.log('log')
return this.appService.getHello();
}
}
I can see the log in the terminal running. When I open the network tab in google chrome to verify the headers, I don't see anything.
I am following this tutorial:: https://youtu.be/F_oOtaxb0L8?t=1530 on youtube
I looked for similar issues on the web and found this :: https://github.com/nestjs/azure-func-http/issues/407
I looked at the documentation and I think I am using everything correctly:: https://docs.nestjs.com/controllers#headers
not sure where I am goofing