项目作者: ptariche

项目描述 :
Fetch, with DNS over HTTPS
高级语言: JavaScript
项目地址: git://github.com/ptariche/fdoh.git
创建时间: 2018-04-10T01:28:07Z
项目社区:https://github.com/ptariche/fdoh

开源协议:MIT License

下载


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

  1. 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}