This commit is contained in:
2022-08-24 00:29:59 +08:00
parent bbe33e2c31
commit 00d088c13f
+9 -6
View File
@@ -27,10 +27,13 @@ local no_exception, resp, resp_err = pcall(httpc.request_uri, httpc, remote_url,
method = "GET",
})
--TODO: send resp.body to Flask API (ai-api) -> convert_mxml_to_xml() -> XML string
--local xml = ai-api.convert_mxml_to_xml(resp.body)
--ngx.say(xml)
ngx.say("RESP -> ", pl.write(resp))
---- save the content to a file
local f = assert(io.open('test.jpg', 'wb')) -- open in "binary" mode
f:write(resp.body)
--
f:close()
--ngx.say("RESP -> ", pl.write(resp))
------ save the content to a file
--local f = assert(io.open('test.jpg', 'wb')) -- open in "binary" mode
--f:write(resp.body)
----
--f:close()