How to access header keys from inside swagger-tools controllers?

479 Views Asked by At

When a parameter is defined to be 'in' header, then swagger-tools makes it available to controllers via 'args' variable, but other header's keys will not be included.

My question is: how to read header keys and values that are not specifically defined in 'parameters' section, such as 'cache-control' or 'X-Requested-With'?

1

There are 1 best solutions below

0
On BEST ANSWER

Request headers are included in:

res.socket.parser.incoming.headers