0.2.0 • Published 11 months ago

undici-tls-dispatcher v0.2.0

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
11 months ago

undici-tls-dispatcher

An undici dispatcher to enable TLS for given URLs

Install

npm i undici-tls-dispatcher

Usage

const UndiciTLSDispatcher = require('undici-tls-dispatcher')
const dispatcher = new UndiciTLSDispatcher({
  tlsConfig: [
    {
      url: 'https://yourserver.com',
      tls: {
        ca: '...'
        cert: '...'
        key: '...'
      }
    }
  ]
})

const res = await request(httpsServerUrl, { dispatcher })
...

See test.js for a complete example.

License

Apache 2.0

0.2.0

11 months ago

0.1.0

1 year ago