Open FND opened 9 years ago
routes.clj only contains the URI route patterns and functions for generating links inside statuses. The routes statuses responds to can be found here. The last argument is the function which is called when a route is hit. E.g. hitting /statuses/info results in info being called.
A first starting point would be to check there for the Accept
header and render the content in the matching format.
Hope this helps.
currently requesting an alternative representation requires a query parameter (e.g.
?format=json
) - the same should be possible with anAccept
headerI'd tried looking into this, but the current implementation is too primitive, providing insufficient infrastructure for a Clojure ignoramus like myself to get started: https://github.com/innoq/statuses/blob/53d3186/src/statuses/routes.clj#L12 https://github.com/innoq/statuses/blob/53d3186/src/statuses/routes.clj#L33