Lua-cURLv3/examples/cURLv3/file.lua

16 lines
221 B
Lua

local cURL = require "cURL"
-- open output file
f = io.open("example_homepage", "w")
cURL.easy{
url = "http://www.example.com/",
writefunction = f
}
:perform()
:close()
-- close output file
f:close()
print("Done")