Skip to content

flexible content negotiation #1054

@FND

Description

@FND

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions