Compare commits

..

No commits in common. "main" and "v1.1.2-beta" have entirely different histories.

View file

@ -19,8 +19,6 @@ if not http.checkURL(args[1]) then
error("Invalid URL", 0) error("Invalid URL", 0)
end end
print("Connecting...")
local response, err = http.get(args[1], nil, { local response, err = http.get(args[1], nil, {
binary = true, binary = true,
}) })
@ -29,8 +27,8 @@ if not response then
end end
local file <close> = fs.open(outputPath, "wb") local file <close> = fs.open(outputPath, "wb")
file:write(response.content:read("a")) file:write(response:readAll())
file:close() file:close()
response.content:close() response:close()
print("Downloaded to " .. outputPath) print("File written to " .. outputPath)