I want to get the content of curl -cacert \<file\> \<url\> in my JavaScript API with axois but I am confused where to add the specified certificate file. Or can other libs than axois are able to implement this?
I try to do:
const agent = new https.Agent({ca: fs.readFileSync(<cacert file>),});
var instance = axios.create({ agent: agent });
const response = await instance.get(url);
It seems not working. Any suggestions for this? Thank you so much!