I have been at this all day. I have done everything I need to do but I am still failing all the test and I don't know why

Tell us what’s happening:
Describe your issue in detail here.

Regarding the header parser microservice project… I don’t know why I am not passing the tests because I think I have done everything I need to do. Here’s my code so far:
app.get("/api/whoami", (req,res)=>{
res.json({“ipaddress”: req.socket.remoteAddress, “language”: req.headers[‘accept-language’], “software”: req.headers[‘user-agent’], })
})

Your project link(s)

solution: https://fcchpms.herokuapp.com/api/whoami

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36

Challenge: Request Header Parser Microservice

Link to the challenge:

1 Like

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Regarding the header parser microservice project… I don’t know why I am not passing the tests because I think I have done everything I need to do. Here’s my code so far:

app.get("/api/whoami", (req,res)=>{
res.json({“ipaddress”: req.socket.remoteAddress, “language”: req.headers[‘accept-language’], “software”: req.headers[‘user-agent’], })
})

Submit the URL without the paths. It passes for me when I do that.

https://fcchpms.herokuapp.com

1 Like

OMG!!! Thank you very much… It worked!!!

1 Like