Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update res var in NPM docs example #13

Open
aziznatour opened this issue Jan 16, 2018 · 0 comments
Open

Update res var in NPM docs example #13

aziznatour opened this issue Jan 16, 2018 · 0 comments

Comments

@aziznatour
Copy link

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');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant