M
dns.resolveTxt
History
Added in: v0.1.27
v0.1.27
Introduced in: v0.10.0
v0.10.0
Passing an invalid callback to the
callback argument now throws ERR_INVALID_ARG_TYPE instead of ERR_INVALID_CALLBACK.v18.0.0
dns.resolveTxt(hostname, callback): void
Attributes
Uses the DNS protocol to resolve text queries (TXT records) for the
hostname. The records argument passed to the callback function is a
two-dimensional array of the text records available for hostname (e.g.
[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of
one record. Depending on the use case, these could be either joined together or
treated separately.