Can axois implement curl -cacert ?

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);

But it seems not work. Any suggestions for this? Thank you so much!