Fork me on GitHub

Is there an interceptor that would encode response body based on client set headers (`accept` & friends), e.g. based on results of io.pedestal.http.content-negotiation/negotiate-content?


as the io.pedestal.http.body-params/body-params does decoding for multiple formats...


Heyas, I'm having trouble with the json parser. My defroutes is:

(defroutes routes
           [[["/" {:get [::send-counter (sse/start-event-stream sse-stream-ready)]}
              ["/with-id" {:get [::send-counter-with-id
                                 (sse/start-event-stream sse-stream-ready-with-id)]}]
              ["/about" {:get about-page}]
              ["/echo" {:post [(b/body-params) test-channel]}]

but when I compile I get the error
Caused by: java.lang.AssertionError: Assert failed: This vector for the verb map has extra elements. The leftover elements are (test-channel) from the original data [(b/body-params) test-channel]