问题描述
我尝试使用http.get(url,header,function)从Firebase获取数据。
Im trying to use http.get(url, headers, function) to get data from Firebase.
Othersites(也是https网站)工作正常,我得到了我希望回应,但firebase给了我一个错误8.
Othersites (also https sites) work fine and i get the response i expect, but firebase gives me a error 8.
我找不到任何关于此错误的文档(或任何错误) - 有谁知道这意味着什么?
I cant find any documentation of this error (or any errors) - does anyone know what it means?
http.get("https://<my-firebaseID>.com/somefile.json", "", function(code, data)
if (code < 0) then
print("HTTP request failed")
else
print(code, data)
end
end)
NodeMCU custom build by frightanic.com
branch: master
commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0
SSL: true
modules: adc,bit,cjson,file,gpio,http,i2c,net,node,pwm,spi,struct,tmr,uart,websocket,wifi,wps,tls
build built on: 2017-02-23 10:24
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)
HTTP client: Disconnected with error: 8
HTTP client: Connection timeout
HTTP client: Connection timeout
谢谢
推荐答案
我可以提供正确但仍然不满意的答案 - 这是一个已知问题,请参阅。如果您构建启用了调试的固件,您可能会看到类似于该问题中报告的消息。
I can provide a correct but still dissatisfactory answer - it's a known issue, see https://github.com/nodemcu/nodemcu-firmware/issues/1707. If you build a firmware with debug enabled you'll likely see messages similar to the one reported in that issue.
这篇关于NodeMCU,Lua http.get()" Disconnected with error 8" - 什么是错误8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!