This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-05
Channels
- # babashka (4)
- # bangalore-clj (1)
- # calva (5)
- # chlorine-clover (1)
- # cider (5)
- # clara (9)
- # clj-kondo (18)
- # cljs-dev (12)
- # clojure (42)
- # clojure-europe (9)
- # clojure-norway (1)
- # clojure-uk (4)
- # clojured (255)
- # clojurescript (76)
- # community-development (3)
- # conjure (4)
- # emacs (9)
- # figwheel (3)
- # fulcro (6)
- # graalvm (6)
- # java (15)
- # lsp (7)
- # luminus (1)
- # off-topic (5)
- # pathom (9)
- # reagent (5)
- # ring (6)
- # shadow-cljs (38)
- # sql (21)
- # xtdb (12)
Hey guys, Anyone have an easy way to send multipart/form-data requests with ring-mock? I'm having a heck of a time trying to post a file.
My ring handler returns this response {:status 400, :headers {}, :body "Bad request."}
(after middleware), however my browser receives a 404 with no body when I send a request.
What might the reason for that be? I have no routing installed, and no part in my code creates a 404 response.
(defn wrap-log [handler]
(fn [req]
(println "-----REQUEST-----")
(pprint req)
(println "-----RESPONSE-----")
(pprint (handler req))))
(def app
(-> handler
wrap-json-response
wrap-clean-json
wrap-json-body
(wrap-authenticate (:public-key config))
wrap-log))
(defn -main [& args]
(mount/start)
(http-server/run-server app))
This is an excerpt from my main namespace. I got the information about the response from the wrap-log middleware. The server is http-kit.