Access the time stamp of a HTTP request in Node.js Access the time stamp of a HTTP request in Node.js express express

Access the time stamp of a HTTP request in Node.js


There is Date in request headers that can be used to retrieve timestamp.

If you are using Express-4.x you can use req.get(headerName) to get it.

If you are using node http module try to do console.dir(req.headers). If its available you can get it from req.headers["Date"]

This all are valid provided your the timestamp is sent across network from client side. Do also inspect the request (Lets say Chrome Dev tool Network) and check what all headers are sent.