All Products
Search
Document Center

HTTPDNS:Domain name resolution interfaces (deprecated)

Last Updated:Dec 11, 2025

Synchronous non-blocking domain name resolution

  • The synchronous non-blocking interface resolves a domain name without blocking the current thread. However, it may return an empty result.

  • This interface queries only the cache for a resolution result. If the cache is empty or the cached result has expired, the domain name is resolved in a worker thread. The cache is then updated with the new result for future 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 returned IP address is the first one in the IP array that the server returns. It may not be the optimal IP 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 returned IP address is the first one in the IPv4 array that the server returns. It may not be the optimal IP 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 returned IP address is the first one in the IPv6 array that the server returns. It may not be the optimal IP 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 returned IP address is the first one in the IPv6 array that the server returns. It may not be the optimal IP 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 versions

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 parsed 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

Parsing results

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

Parsed results.