Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 313 Bytes
local cURL = require("cURL")
-- open output file
f = io.open("example_homepage", "w")
c = cURL.easy_init()
-- setup url
c:setopt_url("http://www.example.com/")
-- perform, invokes callbacks
c:perform({writefunction = function(str)
f:write(str)
end})
-- close output file
f:close()
print("Done")