Package org.jclouds.rest

Examples of org.jclouds.rest.HttpClient.post()


      Payload fakePayload = new StringPayload("");
      fakePayload.getContentMetadata().setContentLength(reallyLongContent);

      try {
         try {
            client.post(server.getUrl("/").toURI(), fakePayload);
            fail("Should have errored since we didn't sent that much data!");
         } catch (HttpResponseException expected) {
         }
         assertEquals(server.takeRequest().getHeader(CONTENT_LENGTH), String.valueOf(reallyLongContent));
      } finally {
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.