本文整理了Java中com.amazonaws.http.UrlHttpClient.enableCustomTrustManager()
方法的一些代码示例,展示了UrlHttpClient.enableCustomTrustManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UrlHttpClient.enableCustomTrustManager()
方法的具体详情如下:
包路径:com.amazonaws.http.UrlHttpClient
类名称:UrlHttpClient
方法名:enableCustomTrustManager
暂无
代码示例来源:origin: aws-amplify/aws-sdk-android
void configureConnection(HttpRequest request, HttpURLConnection connection) {
// configure the connection
connection.setConnectTimeout(config.getConnectionTimeout());
connection.setReadTimeout(config.getSocketTimeout());
// disable redirect and cache
connection.setInstanceFollowRedirects(false);
connection.setUseCaches(false);
// is streaming
if (request.isStreaming()) {
connection.setChunkedStreamingMode(0);
}
// configure https connection
if (connection instanceof HttpsURLConnection) {
final HttpsURLConnection https = (HttpsURLConnection) connection;
// disable cert check
/*
* Commented as per https://support.google.com/faqs/answer/6346016. Uncomment for testing.
if (System.getProperty(DISABLE_CERT_CHECKING_SYSTEM_PROPERTY) != null) {
disableCertificateValidation(https);
}
*/
if (config.getTrustManager() != null) {
enableCustomTrustManager(https);
}
}
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
void configureConnection(HttpRequest request, HttpURLConnection connection) {
// configure the connection
connection.setConnectTimeout(config.getConnectionTimeout());
connection.setReadTimeout(config.getSocketTimeout());
// disable redirect and cache
connection.setInstanceFollowRedirects(false);
connection.setUseCaches(false);
// is streaming
if (request.isStreaming()) {
connection.setChunkedStreamingMode(0);
}
// configure https connection
if (connection instanceof HttpsURLConnection) {
final HttpsURLConnection https = (HttpsURLConnection) connection;
// disable cert check
/*
* Commented as per https://support.google.com/faqs/answer/6346016. Uncomment for testing.
if (System.getProperty(DISABLE_CERT_CHECKING_SYSTEM_PROPERTY) != null) {
disableCertificateValidation(https);
}
*/
if (config.getTrustManager() != null) {
enableCustomTrustManager(https);
}
}
}
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
void configureConnection(HttpRequest request, HttpURLConnection connection) {
// configure the connection
connection.setConnectTimeout(config.getConnectionTimeout());
connection.setReadTimeout(config.getSocketTimeout());
// disable redirect and cache
connection.setInstanceFollowRedirects(false);
connection.setUseCaches(false);
// is streaming
if (request.isStreaming()) {
connection.setChunkedStreamingMode(0);
}
// configure https connection
if (connection instanceof HttpsURLConnection) {
final HttpsURLConnection https = (HttpsURLConnection) connection;
// disable cert check
/*
* Commented as per https://support.google.com/faqs/answer/6346016. Uncomment for testing.
if (System.getProperty(DISABLE_CERT_CHECKING_SYSTEM_PROPERTY) != null) {
disableCertificateValidation(https);
}
*/
if (config.getTrustManager() != null) {
enableCustomTrustManager(https);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!