本文整理汇总了Java中com.squareup.okhttp.OkHttpClient.getProxySelector方法的典型用法代码示例。如果您正苦于以下问题:Java OkHttpClient.getProxySelector方法的具体用法?Java OkHttpClient.getProxySelector怎么用?Java OkHttpClient.getProxySelector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.squareup.okhttp.OkHttpClient
的用法示例。
在下文中一共展示了OkHttpClient.getProxySelector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAddress
import com.squareup.okhttp.OkHttpClient; //导入方法依赖的package包/类
private static Address createAddress(OkHttpClient client, Request request) {
SSLSocketFactory sslSocketFactory = null;
HostnameVerifier hostnameVerifier = null;
CertificatePinner certificatePinner = null;
if (request.isHttps()) {
sslSocketFactory = client.getSslSocketFactory();
hostnameVerifier = client.getHostnameVerifier();
certificatePinner = client.getCertificatePinner();
}
return new Address(request.httpUrl().host(), request.httpUrl().port(), client.getDns(),
client.getSocketFactory(), sslSocketFactory, hostnameVerifier, certificatePinner, client.getAuthenticator(), client.getProxy(), client.getProtocols(), client.getConnectionSpecs(), client.getProxySelector());
}