Просмотр исходного кода

change: demo, airlink/air8101就不要直接打印body了,免得客户以为是乱码, 是报错

Wendal Chen 1 год назад
Родитель
Сommit
3cb35bf086
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      demo/airlink/air8101/main.lua

+ 2 - 1
demo/airlink/air8101/main.lua

@@ -22,7 +22,8 @@ sys.taskInit(function()
     sys.wait(6000)
     while 1 do
         sys.wait(500)
-        log.info("http", http.request("GET", "https://httpbin.air32.cn/bytes/2048", nil, nil, {adapter=socket.LWIP_USER0,timeout=3000}).wait())
+        local code, headers, body = http.request("GET", "https://httpbin.air32.cn/bytes/2048", nil, nil, {adapter=socket.LWIP_USER0,timeout=3000}).wait()
+        log.info("http", code, body and #body)
         log.info("lua", rtos.meminfo())
         log.info("sys", rtos.meminfo("sys"))
     end