I am currently working with node.js and express.js. For my current project, I need to access the raw HTTP header lines (charset and accpeted).
Express.js has a function that returns these encodings and accepted headers, however they are sorted by quality and therefore are not suitable for me in this special case, which I need.
req.accepted // Returns sorted array of accepted header req.acceptedCharsets // Returns sorted array of accepted lang header
However, I need raw strings (iso-8859-5; q = .2, unicode-1-1; q = 0.8, text / *; q = .5, application / json).
Now there is a way, how can I access these raw strings in my express application?
Regards, Crispin
source share