我正在本地尝试通过获取请求获取用户存储库https
https.get
const https = require("https")
https.get({
url: "https://api.github.com/users/ryanve/repos"
}, response => {
let data = ""
response
.on("data", chunk => data += chunk)
.on("end", () => {
console.log(data)
})
})
.on("error", e => {
console.error(e.message)
})
我收到一个ECONNREFUSED
错误
connect ECONNREFUSED 127.0.0.1:443
是什么导致了这个错误?
验证?
我该如何解决?
node --version
是v12.16.2