Skip to content
This repository was archived by the owner on Sep 26, 2024. It is now read-only.

CaptainCluster/Request-Header-Parser-Microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Request Header Parser Microservice

Express.js

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

FreeCodeCamp

Everything not written by me has been cloned from this GitHub repository.

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-microservice

Here is the solution I wrote for this project:

//My additions

app.get("/api/whoami", function(req, res)
{
  return res.json({
    ipaddress: req.ip,
    language: req.headers["accept-language"],
    software: req.headers["user-agent"],
  });
});

About

The second project for the "Back End Development and APIs" course provided by FreeCodeCamp.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors