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

Add Promise API #2

Closed
wants to merge 1 commit into from
Closed

Add Promise API #2

wants to merge 1 commit into from

Conversation

wKovacs64
Copy link

Closes #1.

  • This change is most easily reviewed using Git's -b option to ignore whitespace.
  • Our code styles differ but I tried to mimic yours as much as possible.
  • As discussed in Slack, result headers are omitted from the Promise API. We could resolve the promise to an object containing both results and headers, but this would differ from the current callback usage and normalizing the two would mean a breaking change to callbacks.
  • I didn't want to clutter up the README too much but still felt this needed documenting, so I added one simple example. Let me know if you prefer something else.

@wKovacs64
Copy link
Author

Closing, as Promise supported was added in 2.2.x.

@wKovacs64 wKovacs64 closed this Apr 1, 2017
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.

Support promises additionally to callbacks
1 participant