quick and easy parse http parameters
JavaScript
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

http-params

Build Status npm install

Easy access to http parameters.

usage

var http = require('http')

var parse = require('http-params')

http.createServer(httpHandler).listen(7734)

function httpHandler(req, res) {
  parse(req, display)
  
  function display(err, params) {
    console.log(JSON.stringify(params))
  }
}

For GET and DELETE requests, the query string object is parsed and returned. For POST and PUT requests, the form body is collected, parsed, and returned.

license

MIT