Socket
Socket
Sign inDemoInstall

http-string-parser

Package Overview
Dependencies
0
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-string-parser

Parse HTTP Request and Response from String


Version published
Weekly downloads
15K
decreased by-9.57%
Maintainers
6
Install size
26.0 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 05 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc