I need Fiddler to capture my call from nodejs.
I call https://domain from nodejs like this
import { ProxyAgent, fetch } from 'undici';
const dispatcher = new ProxyAgent('http://127.0.0.1:8888' )
var r2 = await fetch('https://domain', {
method: 'POST',
dispatcher,
headers: {
...}
},
body: ...
}
);
var r2data = await r2.json();
I can do the above call to http://domain, but when I changed to https://domain, I got the below error, any idea how do I handle this? thanks
[cause]: Error: unable to verify the first certificateat TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:519:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at ssl.onhandshakedone (node:_tls_wrap:871:12)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
