Fork me on GitHub

what’s a good pattern to make requests in parallel in an interceptor chain?


right now I have two interceptors that make outbound requests by attaching a future to the context and then returning immediately, but I’m wondering if there is a more idiomatic way


does returning an asynchronous context help? my understanding is that even if the first interceptor returns an async context, the second one will still block until the first one is done


^ Using core.async perhaps?


Alright, classic middleware issue: at first I didn't call not-modified and somehow added the interceptor constructor function as an interceptor to the chain. Fixing that didn't immediately work but I then realized that the interceptor order was wrong, the etag was only set after the not-modified interceptor ran. 🙂


Problem solved 🙂


has anyone ever gotten pedestal’s response-for to work with multipart-params? (ring-mw/multipart-params) as an interceptor doesn’t add the :form-params when using response-for to test, but works when actually hitting the server


i’m not 100% sure but it almost looks like the content type gets explicitly overridden?