Closed vincent-dm closed 2 years ago
Aleph mimics clj-http
behavior, [here](https://github.com/dakrone/clj-http/blob/76130e65aa90df3eb9cf68a5ea5e8d8b2fb2d2e8/src/clj_http/client.clj#L24-L280.
Ok, I see. It's an unfortunate design (especially the silent failing if Cheshire is missing), but if API parity with clj-http
is a primary goal, I guess it's a given...
When fetching data from a JSON-API, I want to parse the response string as a Clojure data structure. The
aleph.http/get
allows me to do this by setting:as :json
in the options map.However: this only seems to work when the Cheshire library is present on the classpath, due to this code. If it isn't, the response will be returned as a string.
This behavior seems like a bug: the flag should either work or throw an exception, but not silently fail.