-- Put in a regular Script in ServerScriptService in a practice place.
-- Choose your own trusted, read-only HTTPS endpoint. No credentials required.
-- Empty by default: no request is sent until you configure URL.
local URL = ""
local HttpService = game:GetService("HttpService")

if URL == "" then
    warn("HTTP check: set URL to your trusted read-only HTTPS endpoint first.")
    return
end
if not string.match(URL, "^https://") then
    warn("HTTP check: this practice example requires an HTTPS URL.")
    return
end
if not HttpService.HttpEnabled then
    warn("HTTP check: HTTP requests are disabled for this experience.")
    return
end

local sent, response = pcall(function()
    return HttpService:RequestAsync({ Url = URL, Method = "GET" })
end)
if not sent then
    -- Do not print the thrown message: it may contain endpoint details.
    warn("HTTP check: the request raised an error. Inspect configuration and endpoint access.")
    return
end
if not response.Success then
    warn("HTTP check: endpoint returned an unsuccessful response.", response.StatusCode)
    return
end
-- Status is diagnostic evidence, not application-data validation.
-- Do not print response bodies, URLs, headers or credentials.
print("HTTP check: successful response.", response.StatusCode)
