ring-middleware-format
ring-middleware-format copied to clipboard
Ring middleware for parsing parameters and emitting responses in JSON or other formats
It'd be nice to be able to write something like: ```clojure (wrap-restful-format handler {:params-options {:transit-json {:predicate pred-fn}}}) ``` It looks like `{:predicate pred-fn}` gets stashed under the `:options` key by...
I pass a header `content-type: application/json; charset=utf-8` in the HTTP request, but the lib ignores it and decides to instead infer the encoding which sometimes leads to :body becoming garbage....
When I follow the link "API Documentation" from the README.md I end up with a "Page not found".
I'm not sure if this is the best fix for it, but right now, there is no way to pass `:predicate` to `wrap-restful-format`, because it ends up getting passed to...
My API has to conform to the JSON API format http://jsonapi.org/format/ I referenced https://github.com/ngrunwald/ring-middleware-format/commit/6f2930789c1bf43c4001bc4fb19fcab284884a99 and built a custom encoder with `application/vnd.api+json` as content type but then the charset media type...
Similar to Transit handlers
Sometimes user needs to return json as text/plain type (because IE9). This works: ``` clj (-> (ok (cheshire.core/generate-string {:ping "pong"})) (content-type "text/plain")) ``` Source: https://github.com/metosin/ring-middleware-format/issues/5
https://github.com/immutant/immutant/blob/2.0.0-beta1/web/src/immutant/web/websocket.clj#L72 In Immutant websocket connection can be initialized from middleware or from standard ring handler. In former case it's possible to reorder middlewares so that r-m-f doesn't see the response...
Hi I'm not sure if this is supported or not, but as far as I can tell this middleware doesn't support (memory) efficient serialisation of large responses. From looking at...