http-string-parser
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/http-string-parser package

0.0.6 • Public • Published

http-string-parser

NPM Version Build Status Dependency Status devDependency Status

Parse HTTP messages (Request and Response) from raw string in Node.JS

Parse HTTP Messages

var parser = require('http-string-parser');
 
request = parser.parseRequest(requestString);
response = parser.parseResponse(responseString);
 
console.log(request);
console.log(response);

See more about Request and Response data model.

API Reference

parseRequest(requestString)

parseRequestLine(requestLine)

parseResponse(responseString)

parseStatusLine(statusLine)

parseHeaders(headersLinesArray)


NOTE: 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 or PEG.js HTTP parser

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.6
    21,944
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.6
    21,944
  • 0.0.5
    1,418
  • 0.0.4
    6,194
  • 0.0.3
    2
  • 0.0.1
    3
  • 0.0.0
    2

Package Sidebar

Install

npm i http-string-parser

Weekly Downloads

14,944

Version

0.0.6

License

MIT

Last publish

Collaborators

  • kubakubula
  • apiary-sre