🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
>内部模块http在woo表中,使用woo.http 即可取到 ## http 请求例子 ~~~woo local http = woo.http:new() http:headers({ ['user-agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.76' }) if _os() == 'windows' then -- windows下需要代理 http:proxy({ channel = 'socks5', host = '127.0.0.1', port = '10000' }) end --local res, err = http:post('http://www.baidu.com') local res, err = http:get('http://www.baidu.com') -- 支持 get post head if res then local body_str = res:str() print(body_str) end ~~~