Skip to content

Support structured MIME suffixes #628

@Blacksmoke16

Description

@Blacksmoke16

Some APIs use vendor-specific MIME types that indicate the underlying structure of the data using a suffix such as +json or +xml. GitHub is a good example of this; using application/vnd.github+json, but also allows for application/vnd.github.FORMAT+json for how to return a given resource.

The ATH::Request#format method returns the forma associated with a given MIME type. However because there is not an explicit mapping of application/vnd.github+json to json, it returns nil. We should add support for these vendor specific MIME types to optionally allow resolving application/vnd.github+json into just json because of the +json suffix.

Can reference symfony/symfony#61267

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions