-
Notifications
You must be signed in to change notification settings - Fork 3.1k
flexible content negotiation #1054
Description
As far as I can tell (though I might well be wrong 🙏), it's currently not possible to perform standard content negotiation without compromising on behavior:
I want to provide multiple representations (e.g. HTML and JSON) for the same resource. As I understand it, previous discussions suggest either using different URIs (i.e. separate resources) or extending the default :browser pipeline to accept additional content types. The former is unrelated to content negotiation (and not always an option), the latter seems less than ideal because much of that pipeline is irrelevant - indeed undesirable, e.g. CSRF protection unnecessarily complicates JSON requests.
So I suppose I'm arguing that pipelines should be dependent on individual requests' Accept header rather than being hard-coded in the router.