day8 / re-frame-http-fx

A re-frame "effects handler" for performing Ajax tasks (via cljs-ajax)
MIT License
259 stars 27 forks source link

Support for request progress monitoring #10

Open p-himik opened 7 years ago

p-himik commented 7 years ago

I guess it's not that hard to implement given that request->xhrio-options already creates goog.net.XhrIo that supports setProgressEventsEnabled.

kennethkalmer commented 4 years ago

Providing a :progress-handler key works:

{:http-xhrio {:progress-handler #(dispatch [::upload-progress %])
              ; ...
              }}

But this very much tied to request->xhrio-options here, and goog.net.XhrIo according to the cljs-ajax README.