fdoh

Fetch DNS over HTTPS

Usage no npm install needed!

<script type="module">
  import fdoh from 'https://cdn.skypack.dev/fdoh';
</script>

README

FDOH

npm version Build Status Coverage Status

Fetch with DNS over HTTPS

The point of this utility is to be able to utilize fetch with your DNS queries running over HTTPS from Cloudflare 1.1.1.1 or Google DNS over HTTPS.

Fetch Example

As Axios Interceptor

Utilization of this can also be added as an axios plugin.

Installation

npm install --save fdoh

Usage of Primary Class

  • Fdoh
    • Arguments

      • url {String}(Fetch API Url)
      • options {Object}(Fetch API Object)
      • provider {String}(GOOGLE or CLOUDFLARE. Defaulted to Cloudflare)
      • responseWithConfig {Boolean} (Utilized to return a basic config for middleware or interceptor libraries)
    • Returns {Optional Object or Function-Object}

      • if responseWithConfig is not passed, Fetch or Node-Fetch is returned
      • if responseWithConfig is set to true, an object is returned
        • Object
          • uri {String}
          • headers {Object}