使用Node.js请求承诺库连接到HTTPS URL时出现SSL错误
在使用URL:《邮递员》中运行时,我得到一个错误: 错误:写入EPROTO 105840:错误:1408F10B:SSL 例程:ssl3\u获取\u记录:版本错误 编号:c:\ws\deps\openssl\openssl\ssl\record\ssl3\u record.c:332: 益百利第三方API不使用自签名。我还可以在邮递员中运行沙箱URL。使用Node.js请求承诺库连接到HTTPS URL时出现SSL错误,node.js,ssl,https,postman,request-promise,Node.js,Ssl,Https,Postman,Request Promise,在使用URL:《邮递员》中运行时,我得到一个错误: 错误:写入EPROTO 105840:错误:1408F10B:SSL 例程:ssl3\u获取\u记录:版本错误 编号:c:\ws\deps\openssl\openssl\ssl\record\ssl3\u record.c:332: 益百利第三方API不使用自签名。我还可以在邮递员中运行沙箱URL。 有人知道问题出在哪里吗?你找到解决办法了吗?在这里得到同样的错误:(我在节点12.6.1.Me上也有同样的错误,得到同样的错误。有解决方案吗?你
有人知道问题出在哪里吗?你找到解决办法了吗?在这里得到同样的错误:(我在节点12.6.1.Me上也有同样的错误,得到同样的错误。有解决方案吗?你的解决方案是什么?
const rp = require('request-promise');
const https = require('https');
const agentOptions = {
host: 'localhost',
port: 443,
path: '/',
rejectUnauthorized: false,
secureProtocol: 'TLSv1_method'
};
const agent = new https.Agent(agentOptions);
const options = {
method: 'POST',
url: 'https://sandbox-us-api.experian.com/consumerservices/social-search/v1/social-search',
headers: request.headers,
body: request.payload,
json: true,
agent: agent
};
const res = await rp(options);