mirror of
https://gitee.com/openLuat/LuatOS
synced 2025-08-17 22:18:03 +08:00
update: demo/wlan演示http的代码,若服务器返回的数据没有body,会报错
This commit is contained in:
parent
dc9ec4ba49
commit
ccf2660d89
|
@ -36,7 +36,7 @@ sys.taskInit(function()
|
|||
-- local url = "http://ip.nutz.cn/json"
|
||||
local url = "http://nutzam.com/1.txt"
|
||||
local code, headers, body = http.request("GET", url).wait()
|
||||
log.info("http", code, json.encode(headers), #body)
|
||||
log.info("http", code, json.encode(headers or {}), body and #body or 0)
|
||||
else
|
||||
print("wlan NOT ready!!!!")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user