Examples of ClientRequest


Examples of org.jboss.resteasy.client.ClientRequest

   }

   @Test
   public void testScannedContextResolverIntf() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/scan-intf/resolver");
      String res = request.getTarget(String.class);
      Assert.assertEquals(res, "42");
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

   }

   @Test
   public void testSingletons() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/application-scan-test/app-path/my/exception");
      ClientResponse response = request.get();
      Assert.assertEquals(412, response.getStatus());

      ClientRequest countRequest = new ClientRequest("http://localhost:8080/application-scan-test/app-path/my/exception/count");
      String res = countRequest.getTarget(String.class);
      Assert.assertEquals("1", res);

      request.clear();
      response = request.get();
      Assert.assertEquals(412, response.getStatus());

      countRequest.clear();
      res = countRequest.getTarget(String.class);
      Assert.assertEquals("1", res);
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

   }

   @Test
   public void testSingletons() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/application-config-test/my/exception");
      ClientResponse response = request.get();
      Assert.assertEquals(412, response.getStatus());

      ClientRequest countRequest = new ClientRequest("http://localhost:8080/application-config-test/my/exception/count");
      String res = countRequest.getTarget(String.class);
      Assert.assertEquals("1", res);

      request.clear();
      response = request.get();
      Assert.assertEquals(412, response.getStatus());

      countRequest.clear();
      res = countRequest.getTarget(String.class);
      Assert.assertEquals("1", res);
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

public class ScanningTest
{
   @Test
   public void testIt() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/prefixed/scan");
      ClientResponse<String> response = request.get(String.class);
      Assert.assertEquals(200, response.getStatus());
      Assert.assertEquals("hello world", response.getEntity());

   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

   }

   @Test
   public void testScannedContextResolver() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/prefixed/scan/resolver");
      String res = request.getTarget(String.class);
      Assert.assertEquals(res, "42");
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest


   @Test
   public void testItIntf() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/prefixed/scan-intf");
      ClientResponse<String> response = request.get(String.class);
      Assert.assertEquals(200, response.getStatus());
      Assert.assertEquals("hello world", response.getEntity());

   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

   }

   @Test
   public void testScannedContextResolverIntf() throws Exception
   {
      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/prefixed/scan-intf/resolver");
      String res = request.getTarget(String.class);
      Assert.assertEquals(res, "42");
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

            {
               URI uri = getURI(method, link, context);
               if (uri == null)
                  return null;

               ClientRequest request = context.getRequest();
               EntityExtractorFactory extractor = context.getExtractorFactory();
               ResteasyProviderFactory provider = request.getProviderFactory();
               ClientExecutor executor = request.getExecutor();
               return ProxyFactory.createClientInvoker(method.getClass(), method, uri,
                       executor, provider, extractor).invoke(args);
            }
         };
      }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

      return headers;
   }

   public ClientRequest createRequest(String uriTemplate)
   {
      return new ClientRequest(uriTemplate, this);
   }
View Full Code Here

Examples of org.jboss.resteasy.client.ClientRequest

      return new ClientRequest(uriTemplate, this);
   }

   public ClientRequest createRequest(UriBuilder uriBuilder)
   {
      return new ClientRequest(uriBuilder, this);
   }
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.