I have a simple app that returns Something: Value as a header. I currently have the following as a controller...
import { Controller, Get, Header } from "@nestjs/common";
@Controller("health")
export class HealthController {
@Get()
@Header("content-type", "application/json")
checkHealth(): unknown {
return {
test: "This is the test",
};
}
}
In express I would expect to be able to do something like req.headers but I am not sure how to do that in nestjs.