Closed kmpm closed 13 years ago
cool, I like it, when the Accept content-negotiation is in this will be nice to automate like you're doing right now. In some sense I would like to replace these .format things with Accept, they are kinda hacky and can lead to some stupid bugs
I have made a small middleware that sets the req.format depending on the accept header.
But I found out that req.format was overwritten in the map function. This change keeps the req.format unless req.params.format format is set which i think should overrule them.
This gives that you can use whatever you set in middleware as a suggestion for format unless it's specifically given on the url.