本文整理匯總了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);
}