Solution for Request Header Parser Microservice Challenge

app.get(’/api/whoami’, (req, res) => {
res.json({
ipaddress: req.ip, // client ip address
language: req.acceptsLanguages()[0], // accepted language
software: req.get(‘User-Agent’) // software
});
});

Challenge: Request Header Parser Microservice

Link to the challenge: