Skip to content

Allow RegisterBodyDecoder to work with content-type suffixes #640

@jamietanna

Description

@jamietanna

For instance, if there is the content-type application/vnd.api+json, we need to register a custom JSON decoder, whereas the content-type suffix +json denotes that it's a valid JSON type.

This should be fairly straightforward - we could leverage https://gitlab.com/jamietanna/content-negotiation-go (a library I wrote) to perform the logic for spec-compliant parsing, or we could simply check if there's a suffix present, and try and match it up.

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