本文整理了Java中com.cloudinary.Url.secure()
方法的一些代码示例,展示了Url.secure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Url.secure()
方法的具体详情如下:
包路径:com.cloudinary.Url
类名称:Url
方法名:secure
暂无
代码示例来源:origin: cloudinary/cloudinary_android
/**
* Get a Cloudinary Url object used to construct urls to access and transform pre-uploaded resources.
*/
public Url url() {
Url url = cloudinary.url();
// set https as default for android P and up - in P the default policy fails all http
// requests
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
url.secure(true);
}
return url;
}
代码示例来源:origin: cloudinary/cloudinary_java
@Test
public void testSecureDistributionOverwrite() {
// should allow overwriting secure distribution if secure=TRUE
String result = cloudinary.url().secure(true).secureDistribution("something.else.com").generate("test");
assertEquals("https://something.else.com/test123/image/upload/test", result);
}
代码示例来源:origin: cloudinary/cloudinary_java
if (resourceType != null) url.resourceType(resourceType);
if (secure != null) {
url.secure(secure.booleanValue());
} else if(Boolean.TRUE.equals(isSecureRequest())) {
url.secure(true);
代码示例来源:origin: cloudinary/cloudinary_java
@Test
public void testSecureDistibution() {
// should take secure distribution from config if secure=TRUE
cloudinary.config.secureDistribution = "config.secure.distribution.com";
String result = cloudinary.url().secure(true).generate("test");
assertEquals("https://config.secure.distribution.com/test123/image/upload/test", result);
}
代码示例来源:origin: cloudinary/cloudinary_java
@Test
public void testSecureDistribution() {
// should use default secure distribution if secure=TRUE
String result = cloudinary.url().secure(true).generate("test");
assertEquals("https://res.cloudinary.com/test123/image/upload/test", result);
}
代码示例来源:origin: cloudinary/cloudinary_java
@Test
public void testUrlCloneConfig(){
// verify that secure (from url.config) is cloned as well:
Url url = cloudinary.url().cloudName("cloud").format("frmt").publicId("123").secure(true);
assertEquals("https://res.cloudinary.com/cloud/image/upload/123.frmt", url.clone().generate());
}
}
内容来源于网络,如有侵权,请联系作者删除!