{"id":15831215,"url":"https://github.com/somajitdey/httparse","last_synced_at":"2025-04-01T11:34:20.006Z","repository":{"id":163920165,"uuid":"362852119","full_name":"SomajitDey/httparse","owner":"SomajitDey","description":"Command-line parser for http request headers. Also see below link for related project.","archived":false,"fork":false,"pushed_at":"2021-04-30T09:19:40.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-12T12:18:59.866Z","etag":null,"topics":["bash","command-line","header-parser","http","http-header","http-header-parser","http-request","http-server","httparse","httparser","jq","parse","parser","shell"],"latest_commit_sha":null,"homepage":"https://github.com/SomajitDey/sertain","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SomajitDey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-29T14:50:50.000Z","updated_at":"2021-07-28T07:06:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfadf017-d567-41a7-b99d-bacec12a0b3d","html_url":"https://github.com/SomajitDey/httparse","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"189f39cf796cb78062b61122556e05b00213a7e5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fhttparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fhttparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fhttparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomajitDey%2Fhttparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomajitDey","download_url":"https://codeload.github.com/SomajitDey/httparse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246634198,"owners_count":20809209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bash","command-line","header-parser","http","http-header","http-header-parser","http-request","http-server","httparse","httparser","jq","parse","parser","shell"],"created_at":"2024-10-05T12:01:42.683Z","updated_at":"2025-04-01T11:34:19.969Z","avatar_url":"https://github.com/SomajitDey.png","language":"Shell","readme":"# httparse\r\n\r\nTakes http request as input and outputs the headers and their values as json. Exits just before reading the request body. Doesn't parse query parameters from the path though. It's on the TODO list.\r\n\r\n#### Dependency:\r\n\r\n`bash`\r\n\r\n(optional) `mktemp` and `jq` \r\n\r\n#### Test-drive:\r\n\r\nRun a simple http server in foreground in a terminal:\r\n\r\n```bash\r\nncat \\\r\n-c './httparse \u003e/dev/tty ;printf \"HTTP/1.1 200 OK\\r\\n\"; timeout 1 cat \u003e/dev/tty' \\\r\n-kl 8080\r\n```\r\n\r\nIn another terminal:\r\n\r\n```bash\r\ncurl localhost:8080 -d \"Hello server\"$'\\r\\n'\r\n```\r\n\r\nSee what you got in the first terminal :-)\r\n\r\nNow, open http://localhost:8080 in a browser and check the new output at the first terminal.\r\n\r\n#### A simple Bash-script server using `httparse`:\r\n\r\nThe demo-server provided, uses `httparse`. Shows any POST/PUT payload on the server terminal, and greets client on GET.\r\n\r\nRun the server on port 8080 as:\r\n\r\n```bash\r\nncat -e './demo-server' -kl 8080\r\n```\r\n\r\nOpen http://localhost:8080 in a browser.\r\n\r\nOr, post a simple payload using cURL:\r\n\r\n```bash\r\ncurl localhost:8080 -d \"Hello server\"\r\n```\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomajitdey%2Fhttparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomajitdey%2Fhttparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomajitdey%2Fhttparse/lists"}