Package org.jboss.resteasy.client

Examples of org.jboss.resteasy.client.ClientRequest.options()


   @Test
   public void testOptions() throws Exception
   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/params/customers/333/phonenumbers"));
      ClientResponse response = request.options();
      Assert.assertEquals(200, response.getStatus());

   }

   @Test
View Full Code Here


   public void testOptions() throws Exception
   {
      ClientRequest request = new ClientRequest(generateURL("/options"));
      try
      {
         ClientResponse<?> response = request.options();
         Assert.assertEquals(HttpResponseCodes.SC_OK, response.getStatus());
         Assert.assertEquals("GET, POST", response.getResponseHeaders().getFirst("Allow"));
         response.releaseConnection();
      }
      catch (Exception e)
View Full Code Here

   public void testDefaultOptions() throws Exception
   {
      ClientRequest request = new ClientRequest(generateURL("/stuff"));
      try
      {
         ClientResponse<?> response = request.options();
         Assert.assertEquals(HttpResponseCodes.SC_OK, response.getStatus());
         String allowed = response.getResponseHeaders().getFirst("Allow");
         Assert.assertNotNull(allowed);
         HashSet<String> vals = new HashSet<String>();
         for (String v : allowed.split(","))
View Full Code Here

    */
   @Test
   public void testOptions() throws Exception
   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/GetTest/sub"));
      ClientResponse<?> response = request.options();
      Assert.assertEquals(200, response.getStatus());
      String allowedHeader = response.getResponseHeaders().getFirst("Allow");
      Assert.assertNotNull(allowedHeader);
      String[] allowed = allowedHeader.split(",");
      HashSet<String> set = new HashSet<String>();
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.