-
-
Notifications
You must be signed in to change notification settings - Fork 646
http.download
João Matos edited this page May 15, 2016
·
15 revisions
Downloads an HTTP resource from the specified URL to a file.
http.download("url", "file", progress, headers)url is the URL to be downloaded. file is the destination path where the resource will be saved. progress is an optional Lua callback function that receives two numeric arguments representing total and current download progress in bytes. headers is an optional Lua table with HTTP headers to be used on the request.
True if successful, otherwise nil and an error message.
http.download("http://example.com/file.zip", "file.zip")http.download("http://example.com/file.zip", "file.zip", nil, {"From: Premake", "Referer: Premake"})Premake 5.0 or later.