Skip to content

Indicate required content-type for webhook subscription verification#145

Merged
Xemdo merged 1 commit intotwitchdev:mainfrom
Nicolas-Reyland:patch-1
Mar 25, 2022
Merged

Indicate required content-type for webhook subscription verification#145
Xemdo merged 1 commit intotwitchdev:mainfrom
Nicolas-Reyland:patch-1

Conversation

@Nicolas-Reyland
Copy link
Copy Markdown
Contributor

Since the documentation doesn't tell it (I looked thoroughly, but I might be wrong), I think it's a good idea to tell the user which content-type is awaited when verifying the webhook subscription.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

The problem I identified (maybe wrongly?) is that it is not specified in the official twitch api documentation which value the Content-Type header should have for the webhook subscription verification. Since I had to look into the source code of this project to get my answer (no hard feelings at all), I think it might be good to indicate to the users of the twitch-cli why their requests are invalid.

Description of Changes:

  • Added the expected value in the two error messages that indicate that the Content-Type doesn't have the right value.

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

Since the documentation doesn't tell it (I looked thoroughly, but I might be wrong), I think it's a good idea to tell the user which content-type is awaited when verifying the webhook subscription.
Copy link
Copy Markdown
Contributor

@BarryCarlyon BarryCarlyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good! If only i had write access!

Also a thing that might need to be changed/tweaked in the main Twitch Docs for EventSub

@Xemdo Xemdo merged commit 9261270 into twitchdev:main Mar 25, 2022
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

Successfully merging this pull request may close these issues.

3 participants