node package manager


library for parsing http-like protocols


node.js package for parsing http-like protocols

npm install httplike
var Parser = require('httplike');
var p = new Parser(socket);
p.on('message', function(msg) {

httplike assumes that the incoming protocol follows HTTP standards on using the Content-Length header to determine how many bytes to wait for in a response body.

  • Fixed parsing involving UTF-8 characters (PR #8), and potential stall in pipelined requests (PR #9)
  • Removed parseHeader from public interface on ClientParser and ServerParser
  • Removed dependency on lodash
  • Implemented built-in response object modeled after express.js response.
  • Added trim() to method and headers
  • Breaking changes to how headers are accessed (getHeader() function instead of headers[]). See tests for example usage.