Open adambom opened 11 years ago
At least right now I'm of the opinion that we should just return RemotRefs to response objects.
This seems to give the most flexibility in terms of blocking when needed but also firing off tons of requests (potentially utilizing added processors) before waiting for responses.
Since promises are apparently cool right now, I feel like I should raise this issue.
We shouldn't really have blocking HTTP requests. Can we have the verbs return a promise object, such that I can do:
Then would take three arguments: onResolved, onError, and onProgress.
I would express it like this:
Of course that doesn't allow us to chain
then
calls, but in general I find chaining to be very difficult in Julia. There may be a way to do it. We could also just pass in handlers as a vector of functions instead of just one function.Open to other approaches too.