Java 类org.apache.http.impl.cookie.BrowserCompatSpecFactory 实例源码

项目:lams    文件:AbstractHttpClient.java   
protected CookieSpecRegistry createCookieSpecRegistry() {
    CookieSpecRegistry registry = new CookieSpecRegistry();
    registry.register(
            CookiePolicy.BEST_MATCH,
            new BestMatchSpecFactory());
    registry.register(
            CookiePolicy.BROWSER_COMPATIBILITY,
            new BrowserCompatSpecFactory());
    registry.register(
            CookiePolicy.NETSCAPE,
            new NetscapeDraftSpecFactory());
    registry.register(
            CookiePolicy.RFC_2109,
            new RFC2109SpecFactory());
    registry.register(
            CookiePolicy.RFC_2965,
            new RFC2965SpecFactory());
    registry.register(
            CookiePolicy.IGNORE_COOKIES,
            new IgnoreSpecFactory());
    return registry;
}
项目:purecloud-iot    文件:AbstractHttpClient.java   
protected CookieSpecRegistry createCookieSpecRegistry() {
    final CookieSpecRegistry registry = new CookieSpecRegistry();
    registry.register(
            CookieSpecs.DEFAULT,
            new BestMatchSpecFactory());
    registry.register(
            CookiePolicy.BEST_MATCH,
            new BestMatchSpecFactory());
    registry.register(
            CookiePolicy.BROWSER_COMPATIBILITY,
            new BrowserCompatSpecFactory());
    registry.register(
            CookiePolicy.NETSCAPE,
            new NetscapeDraftSpecFactory());
    registry.register(
            CookiePolicy.RFC_2109,
            new RFC2109SpecFactory());
    registry.register(
            CookiePolicy.RFC_2965,
            new RFC2965SpecFactory());
    registry.register(
            CookiePolicy.IGNORE_COOKIES,
            new IgnoreSpecFactory());
    return registry;
}
项目:cJUnit-mc626    文件:DefaultHttpClient.java   
@Override
protected CookieSpecRegistry createCookieSpecRegistry() {
    CookieSpecRegistry registry = new CookieSpecRegistry();
    registry.register(
            CookiePolicy.BEST_MATCH, 
            new BestMatchSpecFactory());
    registry.register(
            CookiePolicy.BROWSER_COMPATIBILITY, 
            new BrowserCompatSpecFactory());
    registry.register(
            CookiePolicy.NETSCAPE, 
            new NetscapeDraftSpecFactory());
    registry.register(
            CookiePolicy.RFC_2109, 
            new RFC2109SpecFactory());
    registry.register(
            CookiePolicy.RFC_2965, 
            new RFC2965SpecFactory());
    return registry;
}
项目:itunesconnect-api    文件:Utils.java   
public static Executor createExecutor(CookieStore cookieStore) {
    @SuppressWarnings("deprecation") final Registry<CookieSpecProvider> cookieSpecRegistry =
            RegistryBuilder.<CookieSpecProvider>create().register(CookieSpecs.DEFAULT, new BrowserCompatSpecFactory()).build();
    final CloseableHttpClient client = HttpClients.custom()
            .setDefaultCookieSpecRegistry(cookieSpecRegistry)
            .setDefaultCookieStore(cookieStore)
            .build();
    return Executor.newInstance(client);
}
项目:ZhihuSpider    文件:HttpUtil.java   
public static HttpClientContext getHttpClientContext() {
    HttpClientContext context = null;
    context = HttpClientContext.create();
    Registry<CookieSpecProvider> registry = RegistryBuilder
            .<CookieSpecProvider>create()
            .register(CookieSpecs.BEST_MATCH, new BestMatchSpecFactory())
            .register(CookieSpecs.BROWSER_COMPATIBILITY,
                    new BrowserCompatSpecFactory()).build();
    context.setCookieSpecRegistry(registry);
    return context;
}