diff --git a/test_scripts/test_upt.lua b/test_scripts/test_upt.lua new file mode 100644 index 0000000..6d8a775 --- /dev/null +++ b/test_scripts/test_upt.lua @@ -0,0 +1,10 @@ +-- retrieve the content of a URL +local http = require("socket.http") +local body, code = http.request("https://upyun.alchemy-studio.cn/music-room/17c832cb-bc6b-41f7-96cd-190b7fe4a3d7.jpeg?_upt=e487088a1661273055") +if not body then error(code) end + +-- save the content to a file +local f = assert(io.open('test.jpg', 'wb')) -- open in "binary" mode +f:write(body) + +f:close()