-
Notifications
You must be signed in to change notification settings - Fork 298
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
New Updated Code Breaks Promise Functions #27
Comments
Thanks for your instant feedback! Indeed, the Bluebird promise is hidden inside and 0.3.0 only exposes .then and .catch. To expose additional methods like .bind it only need 3 extra lines of code internally. So which option do you prefer judging from how you use Request-Promise?
|
I think the second way would be the best and most manageable and I would On Nov 11, 2014 3:35 PM, "Nicolai Kamenzky" [email protected]
|
Just to be sure: Only the first method in the chain needs to be .then or .catch. Further chaining can use all Bluebird methods. rp(...).bind(...); // Currently not supported
rp(...).then(...).bind(...); // Already supported because .then() returns a full-fledged Bluebird promise |
Yes this is true and technically you could use the .then and just pass the data through and then have a bluebird instance but the solution also aligned previously would be instantly robust with the .promise() function |
Indeed, thanks for your perspective. I will release 0.3.1 later today with .promise() included. |
Excellent and thank you for a very useful library |
I just published version 0.3.1. Have fun with it. :) |
This was meant to be a combination of both request and bluebird.
But now with the API changes you will no longer be able to use any of bluebird's methods other than .then and .catch.Especially one as useful as .bind(this).
Question: Will you be somehow proxying methods to Bluebird in an upcoming release or is this the way you will go from now on just adding prototyp methods directly to the request object?
The text was updated successfully, but these errors were encountered: