-- some init stuff above here
task.spawn(function()
while script.Parent~=nil and script.Enabled do
local suc,err=pcall(function()
local statsRequest = Services.HTTPS:RequestAsync({
Url = serverStatsUrl,
Method = 'GET',
});
if statsRequest and statsRequest.StatusCode == 200 then
local statsResponse = Services.HTTPS:JSONDecode(statsRequest.Body);
if statsResponse then
globalStatus.isOnline = statsResponse.AcceptsRequests == true;
globalStatus.Version = statsResponse.Version;
globalStatus.Host = statsResponse.HostInfo;
globalStatus.SysInfo = statsResponse.SysStats;
globalStatus.StatusCode = 200;
globalStatus.isErrored = false;
else
globalStatus.isOnline = false;
globalStatus.Version = nil;
globalStatus.Host = nil;
globalStatus.SysInfo = nil;
globalStatus.StatusCode = 200;
globalStatus.isErrored = true;
end;
else
globalStatus.isOnline = false;
globalStatus.Version = nil;
globalStatus.Host = nil;
globalStatus.SysInfo = nil;
globalStatus.StatusCode = statsRequest and statsRequest.StatusCode or nil;
globalStatus.isErrored = true;
end;
if globalStatus.isOnline then
local uptimeRequest = Services.HTTPS:RequestAsync({
Url = serverUptimeUrl,
Method = 'GET',
});
if uptimeRequest and uptimeRequest.StatusCode == 200 then
local uptimeResponse = Services.HTTPS:JSONDecode(uptimeRequest.Body);
globalStatus.Uptime = uptimeResponse and uptimeResponse.uptime or nil;
else
globalStatus.Uptime = nil;
end;
else
globalStatus.Uptime = nil;
end;
end);
if not suc then
warn("Error getting server status: "..err);
globalStatus.isOnline=false;
end;
task.wait(10);
end;
end);
-- actual game logic is below here
Every request made to my Insert Webservice seems to fail with NetFail, I am aware that HttpService is supposed to support HTTP2 but as of now my insert webservice does not have HTTP2 support, and Im wondering if this is intended behavior and I have to switch providers or if possibly its an issue with Roblox’s HttpService
System Information:
CPU: AMD Ryzen 7 8840HS w/ Radeon 780M Graphics @ 2.24 GHZ
GPU: AMD Radeon 780M
RAM: 16 GB (technology unknown)
Windows 11 25H2 Home Edition
Game where bug is consistently happening:
Expected behavior
The expected behavior is that requests to the external server should not fail with NetFail errors
