npm.io
0.0.3 • Published 9 years ago

get-post-data

Licence
Version
0.0.3
Deps
0
Vulns
0
Weekly
0

get-post-data

This method get request post data "in string". May use with native http server and express or other.

#Example

const http = require('http'),
    getPostData = require('get-post-data');
    
http.createServer((req, res) => {
    getPostData(req, (error, postBody) => {
        if (error) {
            // handle error
        }
        console.log(postBody); // <-- print postBody in console.
    }):
}).listen(8888);