Fork me on GitHub
#pedestal
<
2017-03-12
>
ikitommi12:03:59

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?

ikitommi12:03:06

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

bradford23:03:32

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]