我是node.js的新手,我使用请求发送帖子request.but我得到了一个错误!
request({
method: 'POST',
url: config.api + '/index',
body: {
name: "name"
},
json: true
})
throw er; // Unhandled 'error' event
^
Error: Invalid protocol: 127.0.0.1:发布于 2021-04-29 14:10:43
在系统更新后,我在Win10上遇到了类似的问题。这是由系统代理设置引起的。
http_proxy=127.0.0.1:8888
https_proxy=127.0.0.1:8888将上述环境设置更改为
http_proxy=http://127.0.0.1:8888
https_proxy=http://127.0.0.1:8888为我做了这件事。
顺便说一句,如果您使用git-bash,您还可以检查git配置。
$git config --list
...
http.sslverify=false
http.proxy=http://127.0.0.1:8888
https.proxy=http://127.0.0.1:8888
...https://stackoverflow.com/questions/44930738
复制相似问题