List of usage examples for com.squareup.okhttp HttpUrl host
String host
To view the source code for com.squareup.okhttp HttpUrl host.
Click Source Link
From source file:net.yatomiya.e4.util.HttpUtils.java
License:Open Source License
public static String getHost(String url) { try {/*from ww w.j av a 2 s . c o m*/ HttpUrl hurl = HttpUrl.parse(url); return hurl.host(); } catch (Throwable e) { return null; } }
From source file:net.yatomiya.e4.util.HttpUtils.java
License:Open Source License
public static String getHostUrl(String url) { try {/* w w w .j a v a 2 s . c o m*/ HttpUrl hurl = HttpUrl.parse(url); return hurl.scheme() + "://" + hurl.host(); } catch (Throwable e) { return null; } }