diff --git a/doc/api/dns.md b/doc/api/dns.md index 6d0b8999df9050..260b3ea94b94a4 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -195,7 +195,7 @@ corresponding lookup methods. On error, `err` is an [`Error`][] object, where `err.code` is one of the error codes listed [here](#dns_error_codes). -## dns.resolve4(hostname, callback) +## dns.resolve4(hostname[, options], callback) @@ -205,6 +205,13 @@ Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the will contain an array of IPv4 addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). +* `hostname` {String} Hostname to resolve. +* `options` {Object} + * `ttl` {Boolean} Retrieve the Time-To-Live value (TTL) of each record. + The callback receives an array of `{ address: '1.2.3.4', ttl: 60 }` objects + rather than an array of strings. The TTL is expressed in seconds. +* `callback` {Function} An `(err, result)` callback function. + ## dns.resolve6(hostname, callback)