Branch: Tag:

2017-12-01

2017-12-01 07:58:56 by Stephen R. van den Berg <srb@cuci.nl>

Promise: Replace Promise with Promise2, slightly updated interface.

Most notable differences between HTTP.Promise2 and HTTP.Promise:
- Less filling (20% smaller compiled object file).
- Instead of two result objects, we simply have a single
HTTP.Promise.Result object which is passed both on_success()
and on_failure(). Why does the original separate this in a
Promise.Success and Promise.Failure type?
- Various code optimisations, that do not change the interface.
- The Result object lacks the ok() method. What use was/is it?
You should normally already know if you are a success or a failure
callback.
- The Result object returns the raw body through "data", and the decoded
body through get() (to conform more to standard Future objects).

2017-12-01 01:11:18 by Stephen R. van den Berg <srb@cuci.nl>

HTTP.Promise2: Offer get() instead of data in the Result object.

2017-12-01 00:48:06 by Stephen R. van den Berg <srb@cuci.nl>

HTTP.Promise2: Proposed changes/optimisation/simplification of HTTP.Promise.