Constructor
new DNSoverHTTPS(opts)
Create a DNSoverHTTPS instance.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
Options for all requests.
|
Classes
Members
Methods
(async) getDNS(opts) → {Promise.<(Buffer|object)>}
Get a DNS-format response.
Parameters:
Name | Type | Description |
---|---|---|
opts |
DOH_LookupOptions
|
Options for the request. |
Returns:
- Type:
-
Promise.<(Buffer|object)>
DNS result.
getJSON(opts) → {Promise.<(string|object)>}
Make a HTTPS GET request for JSON DNS.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
Options for the request.
|
Returns:
- Type:
-
Promise.<(string|object)>
DNS result.
lookup(name, optsopt) → {Promise.<(Buffer|string|object)>}
Look up a DNS entry using DNS-over-HTTPS (DoH).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string
|
DOH_LookupOptions
|
The DNS name to look up, or opts if this is an object. | ||
opts |
DOH_LookupOptions
|
string
|
<optional> |
{} | Options for the request. If a string is given, it will be used as the rrtype. |
Returns:
- Type:
-
Promise.<(Buffer|string|object)>
DNS result.