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

Updated node simple sample (doc and code) #8

Closed
wants to merge 2 commits into from

Conversation

olivierbloch
Copy link
Contributor

Now using npm package to run the sample
Added loops to ensure the sample keeps on sending data and receiving
notifications

Now using npm package to run the sample
Added loops to ensure the sample keeps on sending data and receiving
notifications
function printResultFor(op) {
return function printResult(err, res) {
if (err) console.log(op + ' error: ' + err.toString());
if (res) console.log(op + ' status: ' + res.statusCode + ' ' + res.statusMessage);
if (res && (res.statusCode != 204)) console.log(op + ' status: ' + res.statusCode + ' ' + res.statusMessage);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you only want to print errors. But the 'if (err) ...' line already does that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually no, I want to print when I receive a result that is not 204 (which is empty) and not an error

@olivierbloch
Copy link
Contributor Author

I will close this one and send a new one from a fork to do a proper code review.

@olivierbloch olivierbloch deleted the nodejs-update-sample branch September 25, 2015 19:50
anporumb pushed a commit that referenced this pull request Nov 2, 2016
Fix readme formatting issue.
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

Successfully merging this pull request may close these issues.

2 participants