{"id":15856787,"url":"https://github.com/ambiere/headerparser","last_synced_at":"2026-05-09T19:11:20.261Z","repository":{"id":210195689,"uuid":"725974887","full_name":"ambiere/headerparser","owner":"ambiere","description":"Simple API built with Node.js and Express that extracts and parses information from HTTP request headers.","archived":false,"fork":false,"pushed_at":"2023-12-04T11:07:11.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T06:08:17.940Z","etag":null,"topics":["express","freecodecamp-project","header-parser","microservice","nodejs"],"latest_commit_sha":null,"homepage":"https://headerparser.fly.dev/v0/api/headerparser","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ambiere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-01T09:10:46.000Z","updated_at":"2023-12-04T09:16:12.000Z","dependencies_parsed_at":"2023-12-04T09:25:54.372Z","dependency_job_id":"c898caa2-06e2-46c6-8711-25e2b4435558","html_url":"https://github.com/ambiere/headerparser","commit_stats":null,"previous_names":["zhid0399123/headerparser","ambiere/headerparser"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ambiere/headerparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambiere%2Fheaderparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambiere%2Fheaderparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambiere%2Fheaderparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambiere%2Fheaderparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ambiere","download_url":"https://codeload.github.com/ambiere/headerparser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambiere%2Fheaderparser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32831639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","freecodecamp-project","header-parser","microservice","nodejs"],"created_at":"2024-10-05T20:03:36.503Z","updated_at":"2026-05-09T19:11:20.241Z","avatar_url":"https://github.com/ambiere.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## headerparser\n\nThe Request Header Parser is a simple API built with Node.js and Express that extracts and parses information from HTTP request headers. It provides endpoints to retrieve details such as IP address, preferred languages, software platform, and other relevant metadata from incoming HTTP requests.\n\n[![js-standard-style](https://img.shields.io/badge/style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) \u0026nbsp;\n[![Test](https://github.com/zhid0399123/headerparser/actions/workflows/CI.yml/badge.svg)](https://github.com/zhid0399123/headerparser/actions/workflows/CI.yml) \u0026nbsp;\n[![Deployment](https://github.com/zhid0399123/headerparser/actions/workflows/fly.yml/badge.svg)](https://github.com/zhid0399123/headerparser/actions/workflows/fly.yml) \u0026nbsp;\n\n## Purpose\n\nThe Request Header Parser is designed to assist developers in retrieving and parsing essential client information from request headers, aiding in various use cases such as user analytics, language preferences, and client compatibility detection.\n\n## Features\n\n1. **IP Address**: Obtain the client's IP address from the request headers.\n2. **Preferred Languages**: Retrieve the preferred languages set in the client's browser.\n3. **Software Platform**: Identify the client's operating system and browser information.\n4. **User-Agent Parsing**: Extract user-agent details for detailed device and browser information.\n\n## Usage locally\n\n### 1.0 Installation:\n\n```bash\ngit clone https://github.com/zhid0399123/headerparser.git\ncd headerparser\npnpm install\n```\n\n### 2.0 Start the Server:\n\n```bash\nnpm start\n```\n\nThe server runs on \u003ca href=\"http://0.0.0.0:3000/v0/api/headerparser/whoami\"\u003ehttp://0.0.0.0:3000/v0/api/headerparser/whoami\u003c/a\u003e by default. You can modify the port in your `.env` file\n\n### 3.0 Endpoint:\n\nSend a GET request to `http://0.0.0.0:3000/v0/api/headerparser/whoami` endpoint to retrieve client's IP address, preferred languages, and user-agent information.\n\nExample:\n\n```bash\ncurl http://0.0.0.0:3000/v0/api/headerparser/whoami\n```\n\nResponse:\n\n```json\n{\n  \"id\": \"e7757827-c456-4354-9b98-b9ebfee29705\",\n  \"ipAddress\": \"159.20.14.100\",\n  \"languages\": \"en-US,en;q=0.5\",\n  \"userAgent\": \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0\"\n}\n```\n\n## Deployment\n\nThe **headerparser** Microservice is deployed and accessible via fly.io, allowing users to interact with the API endpoints. Follow these steps to access the deployed API:\n\n1. **Base URL**: The deployed API can be accessed at [https://headerparser.fly.dev/v0/api/headerparser/whoami](https://headerparser.fly.dev/v0/api/headerparser/whoami).\n\n2. **Usage Examples**: Here's an example using cURL to convert a timestamp to Unix time:\n\n```bash\ncurl -X GET https://headerparser.fly.dev/v0/api/headerparser/whoami\n```\n\n## API Endpoints\n\n`GET /v0/api/headerparser/whoami` Retrieve request header information.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests. Please refer to the [Contributing Guidelines](CONTRIBUTING.md) to get started.\n\n## License\n\nThis project is licensed under the MIT License. Refer to the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambiere%2Fheaderparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fambiere%2Fheaderparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambiere%2Fheaderparser/lists"}