aleph

ikitommi 2019-07-18T07:47:12.061Z

Ring expects the response to be map, so there should be a custom middleware before each component (handler or middleware) that converts Deferred into map so the next step sees a map

ikitommi 2019-07-18T07:48:27.062400Z

if only handler emits Deferreds, just add that mw just before the handler and you are good to go.

ikitommi 2019-07-18T07:52:23.063100Z

like https://github.com/ztellman/aleph/pull/442, but the other way around

ikitommi 2019-07-18T07:53:16.064Z

maybe that mw could be added to aleph?

ikitommi 2019-07-18T07:54:54.066200Z

at least reitit-ring allows one to manipulate the mw chain at creation time, so one could interleave easily such mw between all other mw.

ikitommi 2019-07-18T07:55:48.066900Z

(not saying it's a good idea, just possible)

2019-07-18T15:03:14.068400Z

@ikitommi Do you mean a mw that would deref the incoming response and pass the plain map to the next handler?