Solution of Request Header Parser Microservice

Req object contains the details of headers in headers property

We can easily access the headers details by


Project solution

app.get("/api/whoami", (req, res) => {
  let address =;
  let language = req.headers["accept-language"];
  let software = req.headers["user-agent"];
  res.json({ ipaddress: address, language: language, software: software });

Challenge: Request Header Parser Microservice

Link to the challenge: