See https://docs.nightbot.tv/variables/urlfetch for specs.
Requests normally contain 3 Nightbot-specific headers (response url, user, and channel). It looks like those headers have either changed or are no longer sent.
See https://docs.nightbot.tv/variables/urlfetch for specs.
Requests normally contain 3 Nightbot-specific headers (response url, user, and channel). It looks like those headers have either changed or are no longer sent.
Things broke sometime over the last day or so. Unfortunately, I don't have heavy logging on the server side, and it's returning text, not json. What I found was that Nightbot started returning [Response must be less than 400 characters]. I couldn't figure out why, but I edited my urlfetch command to include extra channel details in the query string, and things started working properly.
The backend was designed to use the headers when they are available, and thus the additional channel details aren't usually included in the urlfetch command. Without that information, a much longer response is returned, which results in the over 400 characters message, so when things started working properly when sending the channel along explicitly, I was lead to believing the headers must be missing. No code was changed in the service being called.
Thank you, @member . That fixed the issue. The service uses a PHP backend, and PHP will make headers available using the original casing for the header names rather than some normalized upper or lower case version. Had they normalized the header casing, it would force case-insensitivity, but as it stands, extra code would need to be added to make it case-insensitive.
I can certainly add code to make it case-insensitive. Please do let me know if you plan on changing the header casing again. With a little lead time, I can make the simple PHP changes to be work with it. In all honestly though, I should probably rewrite that whole backend to work with json.
Didn't find your answer? The community is on Discord.
Ask on Discord