Fork me on GitHub
#re-frame
<
2019-06-21
>
marcjeanson13:06:58

hello, does anybody know how to get the response headers when using re-frame-http-fx? From what I can see cljs-ajax only returns back the body...

manutter5113:06:43

I believe you would make your own :response-format function. If you have a look at cljs-ajax’s json.clc file, I think there’s enough information there that you could make a similar one. https://github.com/JulianBirch/cljs-ajax/blob/master/src/ajax/json.cljc

marcjeanson13:06:07

I figured it might be something like that or needing to add a response interceptor. I'll dig a bit more, thanks!

sashton20:06:30

Is there a reason (reframe/reg-sub ::my-id ::my-id) doesn’t work like (reframe/reg-sub ::my-id #(::my-id %))?

sashton20:06:23

(<sub [::my-id]) resolves as [::my-id], rather than the value in the db for that key