http-methods

1.1.0 • Public • Published

http-methods build status

Handle multiple methods elegantly

Example

var methods = require("http-methods")
    , http = require("http")

http.createServer(methods({
    GET: function (req, res)  { res.end("get") }
    , POST: function (req, res) { res.end("post") }
})).listen(8080)

Installation

npm install http-methods

Tests

npm test

Contributors

  • Raynos

MIT Licenced

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    7,703
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    7,703
  • 1.0.0
    2
  • 0.1.0
    1,287

Package Sidebar

Install

npm i http-methods

Weekly Downloads

2,560

Version

1.1.0

License

none

Last publish

Collaborators

  • raynos