本文整理汇总了Java中okhttp3.UrlComponentEncodingTester.Component类的典型用法代码示例。如果您正苦于以下问题:Java Component类的具体用法?Java Component怎么用?Java Component使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Component类属于okhttp3.UrlComponentEncodingTester包,在下文中一共展示了Component类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: usernameCharacters
import okhttp3.UrlComponentEncodingTester.Component; //导入依赖的package包/类
@Test public void usernameCharacters() throws Exception {
new UrlComponentEncodingTester()
.override(Encoding.PERCENT, '[', ']', '{', '}', '|', '^', '\'', ';', '=', '@')
.override(Encoding.SKIP, ':', '/', '\\', '?', '#')
.skipForUri('%')
.test(Component.USER);
}
示例2: passwordCharacters
import okhttp3.UrlComponentEncodingTester.Component; //导入依赖的package包/类
@Test public void passwordCharacters() throws Exception {
new UrlComponentEncodingTester()
.override(Encoding.PERCENT, '[', ']', '{', '}', '|', '^', '\'', ':', ';', '=', '@')
.override(Encoding.SKIP, '/', '\\', '?', '#')
.skipForUri('%')
.test(Component.PASSWORD);
}
示例3: pathCharacters
import okhttp3.UrlComponentEncodingTester.Component; //导入依赖的package包/类
@Test public void pathCharacters() throws Exception {
new UrlComponentEncodingTester()
.override(Encoding.PERCENT, '^', '{', '}', '|')
.override(Encoding.SKIP, '\\', '?', '#')
.skipForUri('%', '[', ']')
.test(Component.PATH);
}
示例4: queryCharacters
import okhttp3.UrlComponentEncodingTester.Component; //导入依赖的package包/类
@Test public void queryCharacters() throws Exception {
new UrlComponentEncodingTester()
.override(Encoding.IDENTITY, '?', '`')
.override(Encoding.PERCENT, '\'')
.override(Encoding.SKIP, '#', '+')
.skipForUri('%', '\\', '^', '`', '{', '|', '}')
.test(Component.QUERY);
}
示例5: fragmentCharacters
import okhttp3.UrlComponentEncodingTester.Component; //导入依赖的package包/类
@Test public void fragmentCharacters() throws Exception {
new UrlComponentEncodingTester()
.override(Encoding.IDENTITY, ' ', '"', '#', '<', '>', '?', '`')
.skipForUri('%', ' ', '"', '#', '<', '>', '\\', '^', '`', '{', '|', '}')
.identityForNonAscii()
.test(Component.FRAGMENT);
}