Butter Dev Logo
Search:   

Lua Library Tool Apk

-- Require the network library (specific to AndLua) local http = require("socket.http") local ltn12 = require("ltn12") -- Download Google's homepage local response_body = {} local res, code, headers = http.request{ url = "https://www.google.com", sink = ltn12.sink.table(response_body) }

if code == 200 then local file = io.open("/sdcard/google.html", "w") file:write(table.concat(response_body)) file:close() print("Downloaded " .. #response_body .. " bytes") else print("Error: HTTP " .. code) end lua library tool apk

Open AndLua+ and create a new file: downloader.lua . -- Require the network library (specific to AndLua)

By [Your Name/Team]

Run the script. You should see a success message, and you will find google.html in your internal storage. headers = http.request{ url = "https://www.google.com"