//req.headers = {
{
host: 'localhost:5000',
connection: 'keep-alive',
'content-length': '702',
'cache-control': 'max-age=0',
'upgrade-insecure-requests': '1',
'...'}
I'm using node.js I'm trying to extract the 'content-length' from the http req object. When I console.log(req.headers);
I keep getting the following which doesn't allow me to directly access the data I need:
I need the data so I can check for the size of uploaded files. It looks like it should be an easy solution, but I'm stuck. I would appreciate any help thanks!