Package org.asynchttpclient

Examples of org.asynchttpclient.FluentCaseInsensitiveStringsMap


                }
            });

            f.get(20, TimeUnit.SECONDS);
            assertTrue(statusCode.get() != 302);
            FluentCaseInsensitiveStringsMap h = responseHeaders.get();
            assertNotNull(h);
            assertEquals(h.getFirstValue("server"), "gws");
            // This assertion below is not an invariant, since implicitly contains locale-dependant settings
            // and fails when run in country having own localized Google site and it's locale relies on something
            // other than ISO-8859-1.
            // In Hungary for example, http://google.com/ redirects to http://www.google.hu/, a localized
            // Google site, that uses ISO-8892-2 encoding (default for HU). Similar is true for other
View Full Code Here


                    return "OK";
                }
            });

            f.get(20, TimeUnit.SECONDS) ;
            FluentCaseInsensitiveStringsMap h = responseHeaders.get();
            assertNotNull(h);
            String[] values = h.get("Allow").get(0).split(",|, ");
            assertNotNull(values);
            assertEquals(values.length, expected.length);
            Arrays.sort(values);
            assertEquals(values, expected);
           
View Full Code Here

        final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date));

        NettyResponse response = new NettyResponse(new NettyResponseStatus(null, null, null), new HttpResponseHeaders() {
            @Override
            public FluentCaseInsensitiveStringsMap getHeaders() {
                return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef);
            }
        }, null, null);

        List<Cookie> cookies = response.getCookies();
        assertEquals(cookies.size(), 1);
View Full Code Here

    public void testCookieParseMaxAge() {
        final String cookieDef = "efmembercheck=true; max-age=60; path=/; domain=.eclipse.org";
        NettyResponse response = new NettyResponse(new NettyResponseStatus(null, null, null), new HttpResponseHeaders() {
            @Override
            public FluentCaseInsensitiveStringsMap getHeaders() {
                return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef);
            }
        }, null, null);
        List<Cookie> cookies = response.getCookies();
        assertEquals(cookies.size(), 1);
View Full Code Here

    public void testCookieParseWeirdExpiresValue() {
        final String cookieDef = "efmembercheck=true; expires=60; path=/; domain=.eclipse.org";
        NettyResponse response = new NettyResponse(new NettyResponseStatus(null, null, null), new HttpResponseHeaders() {
            @Override
            public FluentCaseInsensitiveStringsMap getHeaders() {
                return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef);
            }
        }, null, null);

        List<Cookie> cookies = response.getCookies();
        assertEquals(cookies.size(), 1);
View Full Code Here

TOP

Related Classes of org.asynchttpclient.FluentCaseInsensitiveStringsMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.