curl-client
curl-client copied to clipboard
Promise logic is broken
- the return value of rejection callback should reinject to fulfill the promise and recover from the error - this is not supported
- chaining promises/callbacks is wrong, see https://blog.domenic.me/youre-missing-the-point-of-promises/
- return from a promise can be a promise too, in which case it should we unwrapped - detailed in #32 already
I'd recommend relying on guzzle/promise to fix all these issues as the implementation there is correct. See also https://promisesaplus.com/