Hello:
I need to pass cert and key options when calling an external API. I passed these in an agent as suggested by a few online posts - although I could not find any official documentation. Here’s my snippet:
const agent = new https.Agent({
cert: publicCert,
key: privateKey,
});
const result = await fetch(Url, {
method: "POST",
body: formBody.join('&'),
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
agent,
});
However, when I do this, I get an error: Forge only supports ‘keepAlive’ as an option to http.Agent
Is there another way I can pass a public certificate and key when making a Forge fetch call?