@salesforce/b2c-tooling-sdk / clients / createTlsDispatcher
Function: createTlsDispatcher()
createTlsDispatcher(
options):Agent|undefined
Defined in: packages/b2c-tooling-sdk/src/clients/tls-dispatcher.ts:96
Creates an undici Agent with custom TLS options for mTLS/self-signed cert support.
Returns undefined if no TLS options are needed (default fetch behavior).
Parameters
options
TLS configuration options
Returns
Agent | undefined
An undici Agent configured for TLS, or undefined if not needed
Examples
ts
// Client certificate authentication
const dispatcher = createTlsDispatcher({
certificate: './my-cert.p12',
passphrase: 'secret',
});ts
// Self-signed certificate support
const dispatcher = createTlsDispatcher({
rejectUnauthorized: false,
});