Deno standard library
Go to Latest
function resolveAny
import { resolveAny } from "";

Uses the DNS protocol to resolve all records (also known as ANY or * query). The ret argument passed to the callback function will be an array containing various types of records. Each object has a property type that indicates the type of the current record. And depending on the type, additional properties will be present on the object.

Here is an example of the ret object passed to the callback:

[ { type: 'A', address: '', ttl: 299 },
  { type: 'CNAME', value: '' },
  { type: 'MX', exchange: '', priority: 50 },
  { type: 'NS', value: '' },
  { type: 'TXT', entries: [ 'v=spf1 ~all' ] },
  { type: 'SOA',
    nsname: '',
    hostmaster: '',
    serial: 156696742,
    refresh: 900,
    retry: 900,
    expire: 1800,
    minttl: 60 } ]

DNS server operators may choose not to respond to ANY queries. It may be better to call individual methods like resolve4, resolveMx, and so on. For more details, see RFC 8482.


hostname: string
callback: (err: ErrnoException | null, addresses: AnyRecord[]) => void