http-codec

0.2.1 • Public • Published

http-codec

A HTTP parser and encoder packaged as a sync stream converter.

Server Usage

var codec = require('http-codec').server;

// Then later in your TCP handling code
stream.on("data", codec.decoder(function (item) {
  // For requests, the first item is { method, path, headers }
  // After that it gives body chunks
  // And an empty item to signify the end of the request stream.
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.1
    1
  • 0.1.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i http-codec

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • creationix