Package org.xlightweb.client

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


      new NonBlockingConnection(InetAddress.getByName("www.web.de"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertTrue((response.getStatus() >= 200) && (response.getStatus() < 400));
  }

 
View Full Code Here


      new NonBlockingConnection(InetAddress.getByName("www.web.de"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertEquals(200, response.getStatus());
  }

 
View Full Code Here

      new NonBlockingConnection(InetAddress.getByName("www.web.de"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertEquals(200, response.getStatus());
  }

 
View Full Code Here

      new NonBlockingConnection(InetAddress.getByName("www.web.de"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertEquals(200, response.getStatus());
  }

 
View Full Code Here

    IServer server = new HttpServer(new EchoHandler());
    server.start();



    IHttpResponse response = httpClient.call(new PostRequest("http://localhost:" + server.getLocalPort() + "/", "text/plain", "Herzlichen Gl\u00FCckwunsch, Sie haben sich zur Reinigung des Aufzugs entschlossen."));
    String body = response.getBody().readString();

    server.close();
    httpClient.close();
View Full Code Here

    IServer server = new HttpServer(new EchoHandler());
    server.start();



    IHttpResponse response = httpClient.call(new PostRequest("http://localhost:" + server.getLocalPort() + "/", "text/plain", "Herzlichen Gl\u00FCckwunsch, Sie haben sich zur Reinigung des Aufzugs entschlossen."));
    String body = response.getBody().readString();

    server.close();
    httpClient.close();
View Full Code Here


    PostRequest postRequest = new PostRequest("http://localhost:" + server.getLocalPort() + "/", "text/plain", "Herzlichen Gl\u00FCckwunsch, Sie haben sich zur Reinigung des Aufzugs entschlossen.");
    postRequest.setTransferEncoding("chunked");

    IHttpResponse response = httpClient.call(postRequest);
    String body = response.getBody().readString();

    server.close();
    httpClient.close();
   
View Full Code Here

      new NonBlockingConnection(InetAddress.getByName("www.gmx.com"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertEquals(302, response.getStatus());
  }

 
View Full Code Here

      new NonBlockingConnection(InetAddress.getByName("www.web.de"), 80, ch, false, 2000);
     
      QAUtil.sleep(1500);
     
      IHttpClientEndpoint httpEndpoint = ch.getHttpConnection();
      IHttpResponse response = httpEndpoint.call(new GetRequest("/"));

      Assert.assertTrue((response.getStatus() >= 200) && (response.getStatus() < 400));
  }

 
View Full Code Here

  @Test
  public void testLiveGet() throws Exception {
    IHttpClientEndpoint httpClient = new HttpClient();
   
    IHttpResponse response = httpClient.call(new GetRequest("http://www.web.de/index.html"));
    Assert.assertEquals(302, response.getStatus());
  }
 
 
  @Test
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.