add test upt

This commit is contained in:
2022-08-23 23:48:00 +08:00
parent ab1c36abf8
commit 51532d03b4
+10
View File
@@ -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()