Package org.xlightweb.client

Examples of org.xlightweb.client.HttpClient.call()


            HttpClient httpClient = new HttpClient();
            httpClient.setMaxRetries(0);

            for (int j = 0; j< 1000; j++) {
              GetRequest request = new GetRequest("http://localhost:" + webContainer.getLocalPort() + "/");
              IHttpResponse response = httpClient.call(request);
             
              Assert.assertEquals(200, response.getStatus());
              Assert.assertEquals("OK", response.getBlockingBody().readString());
            }
           
View Full Code Here


          try {
            HttpClient httpClient = new HttpClient();
            httpClient.setMaxRetries(0);

            for (int j = 0; j< 1000; j++) {
              IHttpResponse response = httpClient.call(new GetRequest("http://localhost:" + server.getLocalPort() + "/"));
             
              Assert.assertEquals(200, response.getStatus());
              Assert.assertEquals("OK", response.getBlockingBody().readString());
            }
           
View Full Code Here

            HttpClient httpClient = new HttpClient();
            httpClient.setMaxRetries(0);

            for (int j = 0; j< 1000; j++) {
              GetRequest request = new GetRequest("http://localhost:" + server.getLocalPort() + "/");
              IHttpResponse response = httpClient.call(request);
             
              Assert.assertEquals(200, response.getStatus());
              Assert.assertEquals("OK", response.getBlockingBody().readString());
            }
           
View Full Code Here

            HttpClient httpClient = new HttpClient();
            httpClient.setMaxRetries(0);

            for (int j = 0; j< 1000; j++) {
              GetRequest request = new GetRequest("http://localhost:" + server.getLocalPort() + "/");
              IHttpResponse response = httpClient.call(request);
             
              Assert.assertEquals(200, response.getStatus());
              Assert.assertEquals("OK", response.getBlockingBody().readString());
            }
           
View Full Code Here

            HttpClient httpClient = new HttpClient();
            httpClient.setMaxRetries(0);

            for (int j = 0; j< 1000; j++) {
              GetRequest request = new GetRequest("http://localhost:" + webContainer.getLocalPort() + "/");
              IHttpResponse response = httpClient.call(request);
             
              if (response.getStatus() != 200) {
                System.out.println("status 200 expected. Got " + response);
                errors.add("status 200 expected. Got " + response.getStatus());
              }
View Full Code Here

                    try {
                        HttpClient httpClient = new HttpClient();

                        for (int j = 0; j< 100; j++) {
                            GetRequest request = new GetRequest("http://localhost:" + webContainer.getLocalPort() + "/");
                            IHttpResponse response = httpClient.call(request);
                           
                            if (response.getStatus() != 200) {
                                System.out.println("status 200 expected. Got " + response);
                                errors.add("status 200 expected. Got " + response.getStatus());
                            }
View Full Code Here

                        HttpClient httpClient = new HttpClient();
                        httpClient.setMaxRetries(0);

                        for (int j = 0; j< 1000; j++) {
                            GetRequest request = new GetRequest("http://localhost:" + webContainer.getLocalPort() + "/");
                            IHttpResponse response = httpClient.call(request);
                           
                            if (response.getStatus() != 200) {
                                System.out.println("status 200 expected. Got " + response);
                                errors.add("status 200 expected. Got " + response.getStatus());
                            }
View Full Code Here

          running.incrementAndGet();
          try {
            HttpClient httpClient = new HttpClient();

            for (int j = 0; j< 1000; j++) {
              IHttpResponse response = httpClient.call(new GetRequest("http://localhost:" + server.getLocalPort() + "/"));
             
              if (response.getStatus() != 200) {
                System.out.println("status 200 expected. Got " + response);
                errors.add("status 200 expected. Got " + response.getStatus());
              }
View Full Code Here

          try {
            HttpClient httpClient = new HttpClient();

            for (int j = 0; j< 1000; j++) {
              GetRequest request = new GetRequest("http://localhost:" + server.getLocalPort() + "/");
              IHttpResponse response = httpClient.call(request);
             
              if (response.getStatus() != 200) {
                System.out.println("status 200 expected. Got " + response.getStatus());
                Assert.fail("status 200 expected. Got " + response.getStatus());
              }
View Full Code Here

        server.start();

        HttpClient httpClient = new HttpClient();

        GetRequest request = new GetRequest("http://localhost:" + server.getLocalPort() + "/");
        IHttpResponse response = httpClient.call(request);
           
        if (response.getStatus() != 200) {
            System.out.println("status 200 expected. Got " + response.getStatus());
            Assert.fail("status 200 expected. Got " + response.getStatus());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.