Headers will be sent in lower case so you need @Headers('my-id')
instead.
Easy to debug by injecting the full headers object:
import { Headers } from '@nestjs/common';
...
@Put("https://stackoverflow.com/")
public async put(@Headers() headers) {
console.log(headers);
}
The headers
variable will then refer to the req.headers
.