MCPcopy
hub / github.com/square/okhttp / Dns

Interface Dns

okhttp/src/main/java/com/squareup/okhttp/internal/Dns.java:25–33  ·  view source on GitHub ↗

Domain name service. Prefer this over InetAddress#getAllByName to make code more testable.

Source from the content-addressed store, hash-verified

23 * make code more testable.
24 */
25public interface Dns {
26 Dns DEFAULT = new Dns() {
27 @Override public InetAddress[] getAllByName(String host) throws UnknownHostException {
28 return InetAddress.getAllByName(host);
29 }
30 };
31
32 InetAddress[] getAllByName(String host) throws UnknownHostException;
33}

Implementers 1

FakeDnsokhttp/src/test/java/com/squareup/okht

Calls

no outgoing calls

Tested by

no test coverage detected