Fork me on GitHub
#re-frame
<
2021-12-14
>
Ryan19:12:07

How do I specify text response format in an :http-xhrio request? The content in question is a csv.

Ryan19:12:27

is it (ajax/text-response-format) ? (ajax being ajax.core)

rovanion09:12:26

Yup, and the response format is probably json or transit rather than csv.

rovanion09:12:28

(def xhrio-settings
  {:format          (ajax/transit-request-format  time/time-serialization-handlers)
   :response-format (ajax/transit-response-format time/time-deserialization-handlers)
   :on-success      [:successful-xhrio-no-data]
   :on-failure      [:bad-http-result]})