-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide default response-format? #4
Milestone
Comments
I would love to have that or at least be able to provide an interceptor that adds a default respone format. Usually in a web application you decide for one format once (being in a clojure environment it will most probably be transit) and then go with it for the rest of the applications life. It is cumbersome to have to provide it in every request one makes. |
superstructor
added a commit
to superstructor/re-frame-http-fx
that referenced
this issue
May 15, 2019
superstructor
added a commit
to superstructor/re-frame-http-fx
that referenced
this issue
May 15, 2019
superstructor
added a commit
to superstructor/re-frame-http-fx
that referenced
this issue
May 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, people need to provide a response format with every request, by requiring
ajax.core
and calling(ajax/json-response-format {:keywords? true})
or similar. cljs-ajax doesn't allow using keywords inajax-call
to lookup response formats because that will defeat dead code elimination. I can see two options:reg-fx
to be inside a function, and let people call it with a default response format as a parameter. This could also be extended to let people provide default interceptors and other default parameters in the request map.I'm probably leaning towards 2, but interested in other feedback.
The text was updated successfully, but these errors were encountered: