So seemingly at random a few days ago, making httprequests to https://api4.my-ip.io/ip.json always returns nil, both in studio and in game.
Is this website rate limited or is something in my code (only showing what’s relevant) incorrect for making httprequests?
The warning of ipError is just “HttpError: Unknown”. It worked perfectly fine before for a couple weeks.
local http = game:GetService("HttpService")
local replicatedStorage = game:GetService("ReplicatedStorage")
local serverLocation = replicatedStorage.serverInfo:WaitForChild("serverLocation")
function GetServerRegion()
local result
local success,ipError = pcall(function()
result = http:JSONDecode(http:GetAsync("https://api4.my-ip.io/ip.json"))
end)
if ipError then
warn(ipError)
serverLocation.Value = "Unknown"
return
end
end
GetServerRegion()