由于某种原因,此请求 GET 永远不会返回,但仅在 Node.js 中返回。我尝试过浏览器、curl、httparty、ruby's Net::Http、postman、clojure,它们都工作正常。 Node.js 不会。
这将按照您的预期返回
echo "require('https').get('https://github.com/jakecraige.json', function(res) { console.log(res); });" | node
这永远不会返回,它最终会抛出 ECONNRESET
echo "require('https').get('https://gateway.rpx.realpage.com/rpxgateway/PricingAndAvailability.svc?wsdl', function(res) { console.log(res); });" | node
如果有人能够对此提供一些见解,那将非常有帮助。
谢谢!
最佳答案
关于javascript - GET 请求不会仅在 Node.JS 内返回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25540616/