This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-07
Channels
- # beginners (7)
- # boot (25)
- # clojure (66)
- # clojure-australia (10)
- # clojure-berlin (1)
- # clojure-czech (1)
- # clojure-denmark (2)
- # clojure-france (27)
- # clojure-italy (6)
- # clojure-japan (1)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-russia (25)
- # clojurescript (55)
- # cursive (27)
- # datascript (2)
- # datomic (5)
- # editors (4)
- # emacs (2)
- # hoplon (183)
- # ldnclj (45)
- # off-topic (4)
- # om (2)
- # rdf (5)
- # re-frame (11)
- # reagent (5)
- # ring (3)
#ring2015-09-07
>
@bernhard I don't know of any pre-packaged solution for ring, but you should be able to do it by wrapping the body with a java.util.zip.GZIPOutputStream
(or java.util.zip.InflaterInputStream
) (when (#{"gzip" "deflate"} (:content-encoding request)))
or something like that
See a gist for doing this in rack, which is a ruby library that's similar to ring in philosophy (in fact, ring took inspiration from rack): https://gist.github.com/relistan/2109707
Shameless plug: if you'd like to log the exact headers (and even the body during development) and other stuff from the request & response you might want to take a look to https://github.com/nberger/ring-logger