I have a problem with roproxy, basically I’m using the roblox API to get all the people who follow a certain userID, but obviously to be able to make the request I need a proxy, basically I changed “roblox.com” with “roproxy.com”, it works, but if for example you make a request, and then do it again a second time, it replies with the old answer even if for example you have followed someone (basically it doesn’t refresh)
local HttpService = game:GetService("HttpService")
local MattQId = 2992118050
local function checkFollowing(player)
local Follower = player.UserId
local Table = "https://friends.roproxy.com/v1/users/".. Follower .."/followings?sortOrder=Asc&limit=100"
local response = HttpService:RequestAsync({
Url = Table,
Method = "GET"
});
if response.Success then
local TableBody = HttpService:JSONDecode(response.Body)
for index, v in pairs(TableBody.data) do
print(v.id)
if v.id == MattQId then
print("Player is following MattQ")
return
end
end
end
print("player is not following MattQ")
end
script.Parent.Triggered:Connect(checkFollowing)
There is no problems with the script, it is likely either caused by caching delays on the roproxy end, or copying data between Roblox servers taking time, which means that certain website actions may take time before they are reflected in the web request.
I believe roblox is caching the first result you get to save on performance. To make it not cache results you can specify it with nocache being set to true. I’m not quite sure if you can just add it to the RequestAsync, but based on what you are trying to do you could just switch to GetAsync:
It might be the case that Roproxy is polling a particular Roblox server.
When you follow a user it might be shown on a particular regional server, however is only updated with the rest, say every five minutes or so, or maybe in batches.
The only feasible way I see to overcome this is to check it in regular intervals in search of changes.
Yeah its possible that roproxy has its own caching system or just updates slower, you can’t do much about it except try to see if it updates after certain amount of time. You should still make sure to tell roblox to not cache as it most likely will try to even if roproxy works.