1
NodeMCU에서 HTTPS GET 요청을 처리하는 데 문제가 있습니다. 해당 문서에 따라 가능해야하며 StackOverflow에 this answer이 있어야합니다.NodeMCU 및 ESP8266을 사용하여 HTTPS 가져 오기 요청
내가 노력하고있어 코드는 다음과 같습니다
function getHTTPS()
http.get('https://httpbin.org/get', nil, function(code, data)
print(code, data)
end)
end
enduser_setup.start(
function()
print("Connected to wifi as: " .. wifi.sta.getip())
getHTTPS()
end,
function(err, str)
print("enduser_setup: Err #" .. err .. ": " .. str)
end
);
이 나에게 결과를 가져옵니다 -1 nil
. URL을 https://httpbin.org/get
에서 http://httpbin.org/get
으로 변경하면 예상 결과가 200 <RESPONSE>
이됩니다.
내 NodeMCU 빌드입니다 : 내가 잘못 뭐하는 거지
NodeMCU custom build by frightanic.com
branch: master
commit: 95e85c74e7310a595aa6bd57dbbc69ec3516e9c6
SSL: true
modules: cjson,enduser_setup,file,gpio,http,mdns,net,node,tmr,uart,wifi build
built on: 2016-08-27 07:36
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
?
오! 이 요청을하는 방법에 대해 알고 있습니까? –
네, 정답입니다. 우리는 [우리 이슈 목록] (https://git.io/v6h6B)과 여기에서 몇 번을 가지고있었습니다. NodeMCU의 SDK가 axTLS 대신 [mbedTLS] (https://github.com/nodemcu/nodemcu-firmware/pull/1435#issuecomment-237364942)를 사용할 때까지는 httpbin.org에 암호화 된 연결을 만들 수 없습니다. –