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

support promise #33

Closed
fengmk2 opened this issue Aug 25, 2014 · 0 comments
Closed

support promise #33

fengmk2 opened this issue Aug 25, 2014 · 0 comments
Assignees

Comments

@fengmk2
Copy link
Member

fengmk2 commented Aug 25, 2014

var urllib = require('urllib');

urllib.request('http://nodejs.org').then(function (result) {
  console.log('status: %s, body size: %d, headers: %j', result.res.statusCode, result.data.length, result.res.headers);
}).error(function (err) {
  console.error(err);
});
@fengmk2 fengmk2 self-assigned this Aug 25, 2014
dead-horse added a commit that referenced this issue Aug 25, 2014
return Promise when callback missing. fixed #33
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