
2.1k Views
37 Executions
HTTP request tester
Universal Script π
arbsturkPublished 5
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Tests you're executor if it supports HTTP request.
local function getRequestFunction()
return (http_request or request or (syn and syn.request) or (fluxus and fluxus.request))
end
local requestFunc = getRequestFunction()
if requestFunc then
print("Trying HTTP request...")
local success, result = pcall(function()
return requestFunc({
Url = "http://httpbin.org/get", -- Safe public HTTP test endpoint
Method = "GET"
})
end)
if success and result and result.StatusCode == 200 then
print("HTTP Request successful! Executor supports HTTP.")
else
warn("HTTP Request failed or response not OK.")
if result then
warn("StatusCode:", result.StatusCode)
warn("Body:", result.Body)
end
end
else
warn("Your executor does not support HTTP requests.")
end









W