Fork me on GitHub
#aleph
<
2019-07-18
>
ikitommi07:07:12

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

ikitommi07:07:27

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

ikitommi07:07:16

maybe that mw could be added to aleph?

ikitommi07:07:54

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.

ikitommi07:07:48

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

dimovich15:07:14

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