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

promises or callbacks #11

Open
Raynos opened this issue Sep 4, 2014 · 2 comments
Open

promises or callbacks #11

Raynos opened this issue Sep 4, 2014 · 2 comments

Comments

@Raynos
Copy link

Raynos commented Sep 4, 2014

Various modules support callbacks or promises.

finalhandler is callback, csrf is both and templation is promises.

I'd be nice if jshttp & pillarjs consistently support either all promises, all callbacks or all both.

I'd personally recommend that we try to support both, i.e. you SHOULD support both and MUST support callbacks.

@dougwilson
Copy link

Yes, I've has some discussions about it with @jonathanong . finalhandler itself is probably an exception, because I don't see how it could possibly even use promises. It would, really. It's not even a callback-style, because you're not passing in a callback to it at all. You can use it with promises and your catch function.

@Fishrock123
Copy link
Member

I'd personally recommend that we try to support both, i.e. you SHOULD support both and MUST support callbacks.

So long as we don't depend on promise libs imo..

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

3 participants