https://github.com/captaincluster/request-header-parser-microservice
The second project for the "Back End Development and APIs" course provided by FreeCodeCamp.
https://github.com/captaincluster/request-header-parser-microservice
backend expressjs freecodecamp freecodecamp-project microservice
Last synced: about 2 months ago
JSON representation
The second project for the "Back End Development and APIs" course provided by FreeCodeCamp.
- Host: GitHub
- URL: https://github.com/captaincluster/request-header-parser-microservice
- Owner: CaptainCluster
- Archived: true
- Created: 2024-05-06T11:50:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-06T12:34:17.000Z (about 1 year ago)
- Last Synced: 2025-02-20T12:47:10.547Z (4 months ago)
- Topics: backend, expressjs, freecodecamp, freecodecamp-project, microservice
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Request Header Parser Microservice

Request Header Parser Microservice is the 2nd project for FreeCodeCamp *Back End Development and APIs* course. It returns a JSON that contains three headers
from a user request: **ip address**, **accept language** and **user agent**.🙏 Credits
---
Everything **not** written by me has been cloned from [this GitHub repository](https://github.com/freeCodeCamp/boilerplate-project-headerparser/).
The default README that comes with the cloned repository:
> This is the boilerplate for the Request Header Parser Microservice project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/request-header-parser-microserviceHere is the solution I wrote for this project:
```
//My additionsapp.get("/api/whoami", function(req, res)
{
return res.json({
ipaddress: req.ip,
language: req.headers["accept-language"],
software: req.headers["user-agent"],
});
});
```