Fork me on GitHub

I've been working on a new conneg namespace for yada, but in such a way it could be used by Liberator, as @ordnungswidrig and I discussed at euroclojure this year


the idea is that you specify a vector of maps, each map defines a 'cross-product' of possible representations


that way, you could offer Japanese in Shift_JIS, but only on GETs


while restricting English to UTF-8 and US-ASCII, unless there's an error, when you can renegotiate and provide errors in html, or json


i.e. the sort of flexibility Apache has


I'd be very interested in any initial impressions and other feedback


I haven't done langs or transfer encodings yet, but they're very possible in this design


also, representation options are properly sorted in priority order as per the HTTP specs, as per the old TODO in the original conneg.clj


I'm happy to spin it off into its own project if necessary, or redo it totally, but I needed something with more features than conneg.clj was providing


I thought about doing the same. The backside is that liberator is bound to an implementation model that does step-by-step negotiation on media-type, language, charset and encoding. I’ve started refactoring liberator’s conneg namespace and still have not found a way to provide a combined conneg as you described while still being backward compatible.