Package org.asynchttpclient

Examples of org.asynchttpclient.AsyncHttpClientConfig


        }
    }

    @Test(groups = { "standalone", "default_provider" })
    public void multipleMaxConnectionOpenTestWithQuery() throws Exception {
        AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnections(true).setConnectTimeout(5000).setMaxConnections(1).build();
        AsyncHttpClient c = getAsyncHttpClient(cg);
        try {
            String body = "hello there";

            // once
View Full Code Here


    }

    // @Test(groups = { "online", "default_provider" })
    public void notRedirected302Test() throws Exception {
        isSet.getAndSet(false);
        AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirect(true).build();
        AsyncHttpClient c = getAsyncHttpClient(cg);
        try {
            Response response = c.prepareGet(getTargetUrl()).setFollowRedirect(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get();

            assertNotNull(response);
View Full Code Here

TOP

Related Classes of org.asynchttpclient.AsyncHttpClientConfig

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.