Skip to content

Refine Content-Type negotiation #229

@trevor-scheer

Description

@trevor-scheer

The parseBody function is only using startsWith and endsWith to figure the content type.

(contentType.startsWith('application/json') ||
contentType.endsWith('+json'))

In most cases (application/json) this is fine. But for users depending on the +json condition, this breaks for cases like this one:

application/ld+json; charset=utf-8

Ref: #228 (reply in thread)

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