Fix the twitch-cli event verification test
I setup everything correctly on my end and tried to test the verification and the twitch-cli respons with this unhelpful error:
✗ Invalid content-type header. Received type
text/plain doesn't work, text/html doesn't work, application/json doesn't work. No Content-Type value I can think of works.
Why is there a restriction on the Content-Type that is kept an absolute mystery?
-
alexnasii commented
The error message you're encountering, "Invalid content-type header. Received type," suggests that the Twitch CLI is expecting a specific Content-Type header in the HTTP response, and the server is not providing it or providing an unsupported type.
The restriction on Content-Type might be enforced by the Twitch CLI to ensure that the server response is in a format it can handle. It's crucial for proper communication between the client and server components.
To resolve this issue, you may need to investigate the Twitch CLI documentation or reach out to their support to identify the correct Content-Type expected by the CLI. Adjusting the Content-Type in your requests to match the expected type could potentially resolve the problem. It's also worth checking if there are any updates or patches for the Twitch CLI that address this issue at https://checkricepurity.com/.
-
BarryCarlyon commented
Your error suggests that you didn't return a content type header as the error message says it recieved no content type header.
The content-type for verficiation is text/plain
Source code for the CLI
The error reports what your content-type was from the call, which seems to be blank.