args={...}
url = args[1]
filename = args[2]
h = http.get(url)
if h then
local content = h.readAll()
h.close()
local f = fs.open(filename, "w")
f.write(content)
f.close()
print("Downloaded "..filename)
else
print("HTTP request failed")
end