You can check for a valid response using ring.util.response/response?
(obviously requires calling the function in question)
On Wed, Jan 27, 2016 at 7:42 AM, JvJ wrote:
> Is there a way to dynamically check whether or not a given function
> qualifies as a ring handler?
>
> --
> You received this
On 27 January 2016 at 05:42, JvJ wrote:
> Is there a way to dynamically check whether or not a given function
> qualifies as a ring handler?
>
Nope. Clojure isn't statically typed, so you can't determine that a
function always returns a value of a particular type.
- James
--
You received this
(constantly nil) would work as a Ring handler.
The str function also would work as a Ring handler.
But it might be unclear (in a context where either a Ring handler, or a
function for some other purpose, was acceptable) whether these were
intended as Ring handlers
--
You received this mes