http-post
http-post copied to clipboard
Update `res` var in NPM docs example
Hello, the NPM README/docs has an invalid example code
https://www.npmjs.com/package/http-post#examples
http.post('http://localhost/postscript.php', { name: 'Sam', email: '[email protected]' }, function(res){
response.setEncoding('utf8');
res.on('data', function(chunk) {
console.log(chunk);
});
});
response.setEncoding('utf8'); should be res.setEncoding('utf8');