Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Node.js请求承诺库连接到HTTPS URL时出现SSL错误_Node.js_Ssl_Https_Postman_Request Promise - Fatal编程技术网

使用Node.js请求承诺库连接到HTTPS URL时出现SSL错误

使用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上也有同样的错误,得到同样的错误。有解决方案吗?你

在使用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上也有同样的错误,得到同样的错误。有解决方案吗?你的解决方案是什么?
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);