Working with request headers in express.js
When receiving an http request from a client, that request will contain all kinds of headers that tell the server useful information about the request. The subject of headers in general can eat up a lot of time because there are a lot of them. However there are great resources such as at Mozilla as usual that outline what all the typical standard headers are when it comes to http requests. This is however a post on expressjs a tired yet true nodejs framework and how to work with incoming request headers.
So then in this post I will be quickly covering some examples of how to work with request headers in express.js with some help with the req.get method method, and the req.headers array that can be found in a request object.