From 51532d03b46b45ec4450fc6472bf265f438a03e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Tue, 23 Aug 2022 23:48:00 +0800 Subject: [PATCH] add test upt --- test_scripts/test_upt.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test_scripts/test_upt.lua 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()