liberator Questions
3
How to return json-data with Clojure Liberator? This code doesn't work:
(defresource poster []
:allowed-methods [:post :options]
:available-media-types ["application/json"]
:post! (fn [ctx] (pr...
1
Solved
I am struggling to return JSON from a put! request:
My code looks like this:
(defn body-as-string [ctx]
(if-let [body (get-in ctx [:request :body])]
(condp instance? body
java.lang.String body
...
1
I have recently inherited a non-finished web app written in Clojure, based on compojure and hiccup basically. It's a bad attempt to model some sort of MVC with OO style not in the FP style as seen ...
2
Solved
I'm not really understanding https://github.com/clojure-liberator/liberator and the list of decision points that it provides to the developer. How would one implement a basic auth/auth service usin...
1
© 2022 - 2024 — McMap. All rights reserved.