温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/dns/promises/resolve
点击访问原文链接

Node dns.promises.resolve function | API Reference | Bun

Node dns.promises.resolve function | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/node:dns/promises/resolveFresolve

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:dns/promises/resolveFresolve

function

dns.promises.resolve On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes)." data-algolia-static="false" data-algolia-merged="false" data-type="Function">function resolve(hostname: string): Promisestring[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

function resolve(hostname: string,rrtype: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promisestring[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'ANY'): PromiseAnyRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'CAA'): PromiseCaaRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'MX'): PromiseMxRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'NAPTR'): PromiseNaptrRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'SOA'): PromiseSoaRecord>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'SRV'): PromiseSrvRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'TLSA'): PromiseTlsaRecord[]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: 'TXT'): Promisestring[][]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

function resolve(hostname: string,rrtype: string): Promisestring[] | SoaRecord | AnyRecord[] | CaaRecord[] | MxRecord[] | NaptrRecord[] | SrvRecord[] | TlsaRecord[] | string[][]>;

Uses the DNS protocol to resolve a host name (e.g. 'nodejs.org') into an array of the resource records. When successful, the Promise is resolved with an array of resource records. The type and structure of individual results vary based on rrtype:

On error, the Promise is rejected with an Error object, where err.code is one of the DNS error codes.

@param hostname

Host name to resolve.

@param rrtype

Resource record type.

Referenced typestype AnyRecord = AnyARecord | AnyAaaaRecord | AnyCaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTlsaRecord | AnyTxtRecordinterface CaaRecordcontactemail?: stringcontactphone?: stringcritical: numberiodef?: stringissue?: stringissuewild?: stringinterface MxRecordexchange: stringpriority: numberinterface NaptrRecordflags: stringorder: numberpreference: numberregexp: stringreplacement: stringservice: stringinterface SoaRecordexpire: numberhostmaster: stringminttl: numbernsname: stringrefresh: numberretry: numberserial: numberinterface SrvRecordname: stringport: numberpriority: numberweight: numberinterface TlsaRecordcertUsage: numberdata: ArrayBuffermatch: numberselector: number

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Node dns.promises.resolve function | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for function node:dns/promises.resolve | Bun