Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Type Functionality is Misleading #18

Open
kristinapathak opened this issue Jul 29, 2020 · 1 comment
Open

Content Type Functionality is Misleading #18

kristinapathak opened this issue Jul 29, 2020 · 1 comment

Comments

@kristinapathak
Copy link
Contributor

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.

@kristinapathak
Copy link
Contributor Author

The issue discussing what to do about sending the full WRP vs the payload can be found at this issue: https://github.com/xmidt-org/webpa-common/issues/505

@joe94 joe94 transferred this issue from xmidt-org/webpa-common Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant