post-parser
A parser that parses post requests
Last updated 4 months ago by ryan20090101 .
ISC · Original npm · Tarball · package.json
$ cnpm install post-parser 
SYNC missed versions from official npm registry.

post-parser

post-parser is a parser that parser post request with only few lines. post-parser only supports parsing requests in the mime type application/x-www-form-urlencoded We are working to support parsing requests in text/plain In order to parse a post request use this code:

var http = require("http")
http.createServer(function(req,res){
  if(req.method = "POST"){
    let parse = require("post-parser")
    parse(req,function(result,err){
      if (err) throw err;
      res.write(result)
      res.end()
    })
  }
}).listen(8080)

Current Tags

  • 1.0.0                                ...           latest (4 months ago)

1 Versions

  • 1.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |