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

spec: Add content-type header #49

Open
sudosubin opened this issue Dec 15, 2023 · 1 comment
Open

spec: Add content-type header #49

sudosubin opened this issue Dec 15, 2023 · 1 comment
Labels

Comments

@sudosubin
Copy link
Contributor

How about specifying the content-type of the webhook request in the spec?

I don't have a definite opinion on this, just a suggestion.

  • content-type: application/json
    • It is the most common and standard value.
  • content-type: application/vnd.standard-webhooks+json (such as application/vnd.go.cd.v1+json, application/vnd.github+json)
    • It follows vendor-specific MIME types.
    • Users can clearly understand that the webhook requests respect the standard-webhooks.
    • It is effective for gradually opt-in or switching from existing webhook consumer implementations. Through the content-type header, user can check whether it is a standard-webhook request and can perform additional authentication logic.
    • Some candidates:
      1. application/vnd.standard-webhooks+json
      2. application/vnd.standard-webhooks.v1+json
      3. application/vnd.standardwebhooks+json
      4. application/vnd.standardwebhooks.v1+json
@tasn tasn added the spec label Dec 15, 2023
@zekth
Copy link
Member

zekth commented Dec 29, 2023

I'm personnaly in favor of application/vnd.standard-webhooks.v1+json
If we introduce this; should the consumer refuse anything that doesn't use this mime type then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants