url = "https://google.com",
-- callbacks will still be called for blocking requests
success = function(status, body, headers) PrintTable({status, body, headers}) end,
failed = function(err, errExt) PrintTable({err, errExt}) end
})
if success then
print("HTTP " .. status)
PrintTable(headers)
print(body)
else
local err, errExt = status, body
-- In this case, status will be the "error message" that Garry's Mod provides (typically always "unsuccessful")
-- and body will be a custom error message from reqwest which actually describes what the error was.
print("Error: " .. err .. " (" .. errExt .. ")")
end
the server crashes during addon loading only when this file is loaded.
the only error code i have is [Pterodactyl Daemon]: Exit code: 139
while trying the function I tried this code
require("reqwest")
local success, status, body, headers = reqwest({ blocking = true, -- note this!
}) if success then print("HTTP " .. status) PrintTable(headers) print(body) else local err, errExt = status, body -- In this case,
status
will be the "error message" that Garry's Mod provides (typically always "unsuccessful") -- andbody
will be a custom error message from reqwest which actually describes what the error was. print("Error: " .. err .. " (" .. errExt .. ")") endthe server crashes during addon loading only when this file is loaded.
the only error code i have is [Pterodactyl Daemon]: Exit code: 139