I’m not entirely sure what you’re doing, but you could do something along these lines to enforce an agent to use particular security.
var protocol = require('https');
var configuration = {
hostname: '',
port: 443,
path: '',
method: '',
secureProtocol: 'TLSv1_2_method'
}
protocol.request(configuration, context => {
// Request information such as body.
});
Not sure that is your intent though, would need more information.
0
solved Javascript equivalent of C# code [closed]