📜  curl 忽略证书 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:15.208000             🧑  作者: Mango

代码示例2
// At instance level
const instance = axios.create({
  httpsAgent: new https.Agent({  
    rejectUnauthorized: false
  })
});
instance.get('https://something.com/foo');

// At request level
const agent = new https.Agent({  
  rejectUnauthorized: false
});
axios.get('https://something.com/foo', { httpsAgent: agent });