【问题标题】:Node - restler - ECONNRESET节点 - restler - ECONNRESET
【发布时间】:2014-10-22 14:56:12
【问题描述】:

我知道这个话题有很多话题。 但是我找不到任何解决问题的方法。

使用带有“restler”的 Node(0.10.*) 作为 REST 模块。

其余 API 使用 HTTPS

一个 api 服务工作 100%,但另一个工作 1/5 休息调用,我得到 ECONNRESET。我知道错误代表什么。

但是,当我使用 Postman 进行其余呼叫时,他们 100% 工作:/

示例代码:

rest.get(config.endPoint + "/focus/api?method=findsc&cid=" + collectionId + "&fid=" + textId + "&max=" + limit + "&apikey=" + config.apiKey + "&format=json").on('complete', function(data) {
                console.log(data);
                callback(true, data.data.items);
            });

【问题讨论】:

    标签: node.js rest https


    【解决方案1】:

    我跳过了插件并改用var https = require('https');,但我确实必须添加它才能使其工作。

    https.globalAgent.options.secureProtocol = 'SSLv3_method';
    

    【讨论】:

      猜你喜欢
      • 2019-03-29
      • 1970-01-01
      • 1970-01-01
      • 2022-01-04
      • 1970-01-01
      • 1970-01-01
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多