Hi, I was running into problems using ring-middleware-format when I was trying to use the wrap-restful-response. It turns out that when I was sending the Accept: application/clojure header it wasn't matching and was still returning me the default format which is json.
So I dug a little bit into the code and found that we're trying grabbing the "Accept" header, however ring lowercases all header names according to https://github.com/mmcgrana/ring/wiki/Concepts . This is probably because header names are really supposed to be case-insensitive.
Anyways, I made the change and everything looks good. I also made a little change to depend on ring-core as it was referred to. I tried to make the dependency a little flexible.
Hi, I was running into problems using ring-middleware-format when I was trying to use the
wrap-restful-response
. It turns out that when I was sending theAccept: application/clojure
header it wasn't matching and was still returning me the default format which is json.So I dug a little bit into the code and found that we're trying grabbing the "Accept" header, however ring lowercases all header names according to https://github.com/mmcgrana/ring/wiki/Concepts . This is probably because header names are really supposed to be case-insensitive.
Anyways, I made the change and everything looks good. I also made a little change to depend on ring-core as it was referred to. I tried to make the dependency a little flexible.
Thanks.