All Products
Search
Document Center

HTTPDNS:Domain name resolution interfaces (deprecated)

Last Updated:Jun 22, 2026

Synchronous non-blocking domain name resolution

  • Resolves a domain name without blocking the current thread, but may return an empty result.

  • Only queries the cache. If no cached result exists or the result has expired, resolution runs in a worker thread and updates the cache for subsequent calls.

getIpByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns a single IPv4 address.

Definition

String getIpByHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.2

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String

The first IP address in the server-returned array. May not be the optimal address.

getIPv4ForHostAsync

Resolves a domain name in synchronous non-blocking mode and returns a single IPv4 address.

Definition

String getIPv4ForHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String

The first address in the server-returned IPv4 array. May not be the optimal address.

getIpsByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IPv4 addresses.

Definition

String[] getIpsByHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.2

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String[]

All IPv4 addresses.

getIPv4ListForHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IPv4 addresses.

Definition

String[] getIPv4ListForHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String[]

All IPv4 addresses.

getIPv6ByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns a single IPv6 address.

Definition

String getIPv6ByHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String

The first address in the server-returned IPv6 array. May not be the optimal address.

getIPv6ForHostAsync

Resolves a domain name in synchronous non-blocking mode and returns a single IPv6 address.

Definition

String getIPv6ForHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String

The first address in the server-returned IPv6 array. May not be the optimal address.

getIPv6sByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IPv6 addresses.

Definition

String[] getIPv6sByHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.2

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String[]

All IPv6 addresses.

getIPv6ListForHostASync

Resolves a domain name in synchronous non-blocking mode and returns all IPv6 addresses.

Definition

String[] getIPv6ListForHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

String[]

All IPv6 addresses.

getAllByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IPv4 and IPv6 addresses.

Definition

HTTPDNSResult getAllByHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.2

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Return value

Type

Description

HTTPDNSResult

The resolution result.

getHttpDnsResultForHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IPv4 and IPv6 addresses.

Definition

HTTPDNSResult getHttpDnsResultForHostAsync(String host)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

Returns

Type

Description

HTTPDNSResult

The resolution result.

getIpsByHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IP addresses of the specified type.

Definition

HTTPDNSResult getIpsByHostAsync(String host, RequestIpType requestIpType)

Class

HttpDnsService

Introduced in version

2.0.2

Deprecated in version

2.3.2

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

requestIpType

RequestIpType

Yes

The type of IP address to resolve. Use RequestIpType.both.

Return value

Type

Description

HTTPDNSResult

The resolution result.

getHttpDnsResultForHostAsync

Resolves a domain name in synchronous non-blocking mode and returns all IP addresses of the specified type.

Definition

HTTPDNSResult getHttpDnsResultForHostAsync(String host, RequestIpType type)

Class

HttpDnsService

Introduced in version

2.3.2

Deprecated in version

2.4.0

Replacement interface

HTTPDNSResult getHttpDnsResultForHostSyncNonBlocking(String host, RequestIpType type)

Parameters

Parameter

Type

Required

Description

host

String

Yes

The domain name to resolve.

requestIpType

RequestIpType

Yes

The type of IP address to resolve. Use RequestIpType.both.

Return value

Type

Description

HTTPDNSResult

The resolution result.