fdoh

1.2.0 • Public • Published

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}

/fdoh/

    Package Sidebar

    Install

    npm i fdoh

    Weekly Downloads

    5

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    9.21 kB

    Total Files

    10

    Last publish

    Collaborators

    • ptariche