本文整理了Java中okhttp3.Handshake.cipherSuite()
方法的一些代码示例,展示了Handshake.cipherSuite()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handshake.cipherSuite()
方法的具体详情如下:
包路径:okhttp3.Handshake
类名称:Handshake
方法名:cipherSuite
[英]Returns the cipher suite used for the connection.
[中]返回用于连接的密码套件。
代码示例来源:origin: square/okhttp
public void run() throws Exception {
Request request = new Request.Builder()
.url("https://publicobject.com/helloworld.txt")
.build();
try (Response response = client.newCall(request).execute()) {
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
System.out.println(response.handshake().cipherSuite());
System.out.println(response.body().string());
}
}
代码示例来源:origin: square/okhttp
@Override
public String getCipherSuite() {
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: square/okhttp
@Override public String getCipherSuite() {
Handshake handshake = handshake();
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: square/okhttp
private static void sendRequest(OkHttpClient client, String url) {
System.out.printf("%-40s ", url);
System.out.flush();
System.out.println(Platform.get());
Request request = new Request.Builder().url(url).build();
try (Response response = client.newCall(request).execute()) {
Handshake handshake = response.handshake();
System.out.println(handshake.tlsVersion()
+ " "
+ handshake.cipherSuite()
+ " "
+ response.protocol()
+ " "
+ response.code
+ " "
+ response.body.bytes().length
+ "b");
} catch (IOException ioe) {
System.out.println(ioe.toString());
}
}
}
代码示例来源:origin: square/okhttp
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: com.squareup.okhttp3/okhttp
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: square/okhttp
sink.writeUtf8(handshake.cipherSuite().javaName())
.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
代码示例来源:origin: com.squareup.okhttp3/okhttp
sink.writeUtf8(handshake.cipherSuite().javaName())
.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
代码示例来源:origin: apollographql/apollo-android
bufferedSink.writeUtf8(handshake.cipherSuite().javaName())
.writeByte('\n');
writeCertList(bufferedSink, handshake.peerCertificates());
代码示例来源:origin: com.squareup.okhttp3/okhttp-android-support
@Override
public String getCipherSuite() {
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: com.github.ljun20160606/okhttp-urlconnection
@Override public String getCipherSuite() {
Handshake handshake = handshake();
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: apache/servicemix-bundles
@Override public String getCipherSuite() {
Handshake handshake = handshake();
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: com.squareup.okhttp3/okhttp-urlconnection
@Override public String getCipherSuite() {
Handshake handshake = handshake();
return handshake != null ? handshake.cipherSuite().javaName() : null;
}
代码示例来源:origin: huxq17/SwipeCardsView
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: com.github.ljun20160606/okhttp
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: duzechao/OKHttpUtils
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: huxq17/tractor
@Override public String toString() {
return "Connection{"
+ route.address().url().host() + ":" + route.address().url().port()
+ ", proxy="
+ route.proxy()
+ " hostAddress="
+ route.socketAddress()
+ " cipherSuite="
+ (handshake != null ? handshake.cipherSuite() : "none")
+ " protocol="
+ protocol
+ '}';
}
}
代码示例来源:origin: huxq17/SwipeCardsView
sink.writeUtf8(handshake.cipherSuite().javaName());
sink.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
代码示例来源:origin: huxq17/tractor
sink.writeUtf8(handshake.cipherSuite().javaName());
sink.writeByte('\n');
writeCertList(sink, handshake.peerCertificates());
内容来源于网络,如有侵权,请联系作者删除!