local arr = ngx.req.get_uri_args();
local http = require "resty.http"
local httpc = http:new()
local res, err = httpc:request_uri("http://video.ymcx.shop/api.php?url="..arr['url'].."", {
method = "GET",
headers = {
["Content-Type"] = "application/x-www-form-urlencoded",
}
})
if not res then
ngx.say("fail to request ", err)
end
ngx.say(res.body)
最后修改:2020 年 12 月 04 日
© 允许规范转载