How to call https through Fiddler Classic from nodejs?

1 Answer 7 Views
Fiddler Classic
David
Top achievements
Rank 1
David asked on 05 Feb 2026, 08:47 PM

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 certificate
      at 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'

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 06 Feb 2026, 09:11 AM

Hello David,

 

You might consider the methods outlined here (even though the article is for Fiddler Everywhere, the process remains the same): https://www.telerik.com/fiddler/fiddler-everywhere/documentation/capture-traffic/advanced-capturing-options/capturing-nodejs-traffic. 

You can set NODE_TLS_REJECT_UNAUTHORIZED to 0, but be aware that this poses a significant security risk, so use it only for testing and revert afterward.

Alternatively, you could export the Fiddler CA certificate as PEM and set it using NODE_EXTRA_CA_CERTS. Fiddler Classic only exports in CRT format, so you'll need to manually convert it to PEM, for example, with:

openssl x509 -inform der -in certificate.cer -out certificate.pem

Fiddler Everywhere offers an automated option to export directly to PEM.

 

Regards,
Nick Iliev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Fiddler Classic
Asked by
David
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or