{"id":28376602,"url":"https://github.com/apiaryio/http-string-parser","last_synced_at":"2025-06-26T10:30:46.029Z","repository":{"id":9664834,"uuid":"11604951","full_name":"apiaryio/http-string-parser","owner":"apiaryio","description":"Parse HTTP Request and Response from String in Node.JS","archived":true,"fork":false,"pushed_at":"2021-07-26T13:49:00.000Z","size":29,"stargazers_count":26,"open_issues_count":7,"forks_count":6,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-30T00:07:20.655Z","etag":null,"topics":["http","parser","sjs-team"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gposton/vagrant-hiera","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apiaryio.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}},"created_at":"2013-07-23T09:45:19.000Z","updated_at":"2024-11-08T09:04:03.000Z","dependencies_parsed_at":"2022-08-20T10:21:00.521Z","dependency_job_id":null,"html_url":"https://github.com/apiaryio/http-string-parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apiaryio/http-string-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apiaryio%2Fhttp-string-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apiaryio%2Fhttp-string-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apiaryio%2Fhttp-string-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apiaryio%2Fhttp-string-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apiaryio","download_url":"https://codeload.github.com/apiaryio/http-string-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apiaryio%2Fhttp-string-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262047769,"owners_count":23250417,"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":["http","parser","sjs-team"],"created_at":"2025-05-30T00:07:20.879Z","updated_at":"2025-06-26T10:30:46.022Z","avatar_url":"https://github.com/apiaryio.png","language":"CoffeeScript","readme":"# http-string-parser\n\n[![NPM Version](https://img.shields.io/npm/v/http-string-parser.svg)](https://www.npmjs.com/package/http-string-parser)\n[![Build Status](https://travis-ci.org/apiaryio/http-string-parser.svg)](https://travis-ci.org/apiaryio/http-string-parser)\n[![Dependency Status](https://david-dm.org/apiaryio/http-string-parser.svg)](https://david-dm.org/apiaryio/http-string-parser)\n[![devDependency Status](https://david-dm.org/apiaryio/http-string-parser/dev-status.svg)](https://david-dm.org/apiaryio/http-string-parser?type=dev)\n\nParse HTTP messages (Request and Response) from raw string in Node.JS\n\n## Parse HTTP Messages\n```javascript\nvar parser = require('http-string-parser');\n\nrequest = parser.parseRequest(requestString);\nresponse = parser.parseResponse(responseString);\n\nconsole.log(request);\nconsole.log(response);\n```\n\nSee more about [Request][request] and [Response][response] data model.\n\n[request]: https://www.relishapp.com/apiary/gavel/docs/data-model#http-request\n[response]: https://www.relishapp.com/apiary/gavel/docs/data-model#http-response\n\n## API Reference\n\n`parseRequest(requestString)`\n\n`parseRequestLine(requestLine)`\n\n`parseResponse(responseString)`\n\n`parseStatusLine(statusLine)`\n\n`parseHeaders(headersLinesArray)`\n\n- - -\n\nNOTE: Proof of concept, naive HTTP parsing, wheel re-inventation. In future it may be replaced with better parser from [Node.JS core's C bindings of NGINX HTTP parser](https://github.com/joyent/http-parser) or [PEG.js HTTP parser](https://npmjs.org/package/http-pegjs)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapiaryio%2Fhttp-string-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapiaryio%2Fhttp-string-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapiaryio%2Fhttp-string-parser/lists"}