function Deno.resolveDns
Overload 1
#resolveDns(query: string,recordType: "A"
 | "AAAA"
 | "ANAME"
 | "CNAME"
 | "NS"
 | "PTR",options?: ResolveDnsOptions,): Promise<string[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
#query: string #recordType: "A"
 | "AAAA"
 | "ANAME"
 | "CNAME"
 | "NS"
 | "PTR" #options: ResolveDnsOptions Return Type #
Promise<string[]> Overload 2
#resolveDns(): Promise<CaaRecord[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<CaaRecord[]> Overload 3
#resolveDns(): Promise<MxRecord[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<MxRecord[]> Overload 4
#resolveDns(): Promise<NaptrRecord[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<NaptrRecord[]> Overload 5
#resolveDns(): Promise<SoaRecord[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<SoaRecord[]> Overload 6
#resolveDns(): Promise<SrvRecord[]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<SrvRecord[]> Overload 7
#resolveDns(): Promise<string[][]>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<string[][]> Overload 8
#resolveDns(): Promise<>Performs DNS resolution against the given query, returning resolved records.
Fails in the cases such as:
- the query is in invalid format.
- the options have an invalid parameter. For example nameServer.portis beyond the range of 16-bit unsigned integer.
- the request timed out.
const a = await Deno.resolveDns("example.com", "A");
const aaaa = await Deno.resolveDns("example.com", "AAAA", {
  nameServer: { ipAddr: "8.8.8.8", port: 53 },
});
Requires allow-net permission.
Parameters #
Return Type #
Promise<>