Code example for HttpPut

Methods: setEntityaddHeadergetParams

   * @throws ClientProtocolException 
   * @throws IOException 
  public static ReadableResponse signedPutRequest(String request, String entity, CommonsHttpOAuthConsumer consumer, String contentType) throws OAuthMessageSignerException, OAuthExpectationFailedException, OAuthCommunicationException, ClientProtocolException, IOException{
    HttpClient client = new DefaultHttpClient();
    HttpPut put = new HttpPut(request);
    put.setEntity(new StringEntity(entity));
    put.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
    put.addHeader("Content-Type", contentType);
    HttpResponse response = client.execute(put);
    return new HttpResponseWrapper(response);
   * Sends a signed GET request using the Signpost library 
   * @param request the request's URL 
   * @param consumer the Signpost consumer object 
   * @param contentType the message's content type 
   * @return the response