No. It returns whether HTTP is enabled or not. If it doesn’t find that error message then it will return false.
I went to write a script that should throw a warning if HTTP isn’t enabled for our game, since code is deployed to dozens of servers and there’s no way to enable HTTP game-wide, we have to remember to do it for each place.
I wanted to automate and detect this, but there’s no way. Why is HttpService.HttpEnabled not readable? This is a huge oversight and the current hack to work around it is awful. Major jank.
This just confused me for a few minutes too.
Basically - the error message “is not allowed to access roblox resources” will only be thrown if HttpEnabled is true. If it’s false, it says “Http requests are not enabled”.
So the way @TheTrollock wrote it works, but if you invert the function to look for “Http requests are not enabled” then you would use == nil
which is, maybe, more readable. It’s not immediately obvious which error is thrown when it’s enabled vs disabled.
Yeah… it’s rather counterintuitive.
After six years, my dream has come true :0
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.