There is a helper to make {:foo "bar"}
=> foo=bar
to turn form-params
into a "body string"?
I think that I need a example of pedestal.test/response-for
doing a HTTP POST with form-params
here’s my rough example using peridot to construct the multipart headers and body
(require '[peridot.multipart :as multipart])
(let [{:keys [body headers]} (multipart/build {:graphic (io/file "foo.bar")
:user-id 1})
{:keys [status body headers]} (-> (::http/service-fn (http/create-servlet server/config))
(response-for :post "/notes"
:body body
:headers headers)
(decode))]
(is (= 201 status))
(is (= foo body)))