我尝试下载并解析一些大的 xml 文件。这些文件来自一些目前没有适当 API 的附属网站。我使用 nodejs 的请求模块,但我总是得到同样的错误。
Error: read ECONNRESET
at exports._errnoException (util.js:746:11)
at TCP.onread (net.js:559:26)
如果我在浏览器中加载相同的 url 或者我从命令行使用 curl 我会得到结果。
request('[my-url].xml', function(err, response, body){
// I get the error here in err
});
知道我该如何解决这个问题吗?谢谢!
最佳答案
两个非常有用的故障排除工具:
另见:
附录:
关于javascript - 错误 : read ECONNRESET using the request module for mode. js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33356258/