Skip to content

Content Type Functionality is Misleading #18

@kristinapathak

Description

@kristinapathak

https://github.com/xmidt-org/webpa-common/blob/7592f89376a7f05449299ec1391ef8456a87b3fe/webhook/webhook.go#L32

Currently the ContentType in the webhook registration is used to determine whether to send the full WRP or just the Payload. We are proposing changing the functionality of the ContentType to instead be used for content negotiation between Caduceus and its webhooks.

If the ContentType specified in the WRP doesn't match what the webhook wants, Caduceus will drop the event instead of sending it.

Ideally, we want to add a field to the webhook struct called Accept or AcceptHeader that specifies a semi-colon deliminated list of MIME ContentTypes that the webhook will accept. Then the ContentType field can be treated as a list of one when no values are given in the Accept field (in order to support backwards compatibility) or deprecated.

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