Last active
December 28, 2020 04:14
-
-
Save groverburger/8e0d812ca99211ab61a1b8ae506fc99f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return function (address) | |
local query = nil | |
-- check if windows or not windows | |
if package.config:sub(1,1) == "\\" then | |
-- TODO fix the annoying cmd window that pops up here | |
query = io.popen("powershell (wget " .. address .. ").Content", "r") | |
else | |
-- not windows, assuming posix | |
query = io.popen("curl -s '" .. address .. "'", "r") | |
end | |
local httpsResult = query:read("*all") | |
query:close() | |
return httpsResult | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment