You might want to look into HTTP.Session, since that will handle
things like reuse of connections and cookies. (I'm not saying it's
intuitive, but it might be a better endpoint than Query for a
Concurrent solution.)
Good call! I’ll take a look at that.
(Query was never written not to have a layer on top of it.)
Yes, but still, stuff like this is a bit cumbersome I think:
Protocols.HTTP.Query q = Protocols.HTTP.Query();
q->set_callbacks(
lambda (Protocols.HTTP.Query c) {
c->timed_async_fetch(
lambda (Protocols.HTTP.Query data) {
werror(”Got data ok\n”);
},
lambda (Protocols.HTTP.Query fail) {
werror(”Failed getting data\n”);
});
},
lambda (Protocols.HTTP.Query c) {
werror(”Connection error\n”);
});
Cheers!