Package org.jboss.resteasy.client.jaxrs

Examples of org.jboss.resteasy.client.jaxrs.ResteasyClient.target()


   @Test
   public void testConnectionCleanupErrorGC() throws Exception
   {
      final ResteasyClient client = createEngine();
      final MyResource proxy = client.target("http://localhost:8081").proxy(MyResource.class);
      counter.set(0);


      Thread[] threads = new Thread[3];
View Full Code Here


   @Test
   public void testConnectionCleanupErrorNoGC() throws Exception
   {
      final ResteasyClient client = createEngine();
      final MyResource proxy = client.target("http://localhost:8081").proxy(MyResource.class);
      counter.set(0);


      Thread[] threads = new Thread[3];
View Full Code Here

   }

   @Test
   public void testConnectionWithRequestBody() throws InterruptedException {
       final ResteasyClient client = createEngine();
       final MyResource proxy = client.target("http://localhost:8081").proxy(MyResource.class);
       counter.set(0);

       Thread[] threads = new Thread[3];

View Full Code Here

   @Test
   public void testMe() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateURL("/lang"));
      Invocation.Builder request = target.request().header("Accept-Language", "en-US;q=0,en;q=0.8,de-AT,de;q=0.9");
      Assert.assertEquals(request.get().getStatus(), 200);
      client.close();

   }
View Full Code Here

   @Test
   public void testMe() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      MyTest proxy = client.target(TestPortProvider.generateURL("")).proxy(MyTest.class);
      try
      {
         proxy.postIt("hello");
         Assert.fail();
      }
View Full Code Here

    */
   @Test
   public void testMultiValueParam() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateURL("/myform/server"));
      Response response = target.request().get();
      int status = response.getStatus();
      Assert.assertEquals(200, status);
      boolean sv1 = false;
      boolean sv2 = false;
View Full Code Here

    */
   @Test
   public void testProxy691() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      MyFormProxy proxy = target.proxy(MyFormProxy.class);
      proxy.post(null);
      client.close();
   }

View Full Code Here

   @Test
   public void testEcho()
   {
      ResteasyClient client = new ResteasyClientBuilder().build();

      ResourceInterface proxy = client.target(generateBaseUrl()).proxy(ResourceInterface.class);
      Assert.assertEquals("content", proxy.echo(null));
      client.close();
   }

View Full Code Here

   @Test
   public void testProxy() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      FormClientProxy proxy = target.proxy(FormClientProxy.class);
      ClientForm form = new ClientForm();
      form.setBooleanValue(true);
      form.setName("This is My Name");
      form.setDoubleValue(123.45);
View Full Code Here

   {     
      InputStream in = null;
      ResteasyClient client = new ResteasyClientBuilder().build();
      try
      {
         ResteasyWebTarget target = client.target(TEST_URI);
         Invocation.Builder request = target.request();
         request.header("custom-header", "42");
         Form form = new Form().param(BOOLEAN_VALUE_FIELD, "true")
                               .param(NAME_FIELD, "This is My Name")
                               .param(DOUBLE_VALUE_FIELD, "123.45")
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.