Code example for HttpPost

Methods: getParams, setEntity

0
    return new ScribeResponseWrapper(requestObj.send());
  } 
   
  private ReadableResponse signedPostRequest(String request, List<NameValuePair> bodyParams) throws OAuthMessageSignerException, OAuthExpectationFailedException, OAuthCommunicationException, ClientProtocolException, IOException{
    HttpClient client = new DefaultHttpClient();
    HttpPost post = new HttpPost(request);
    post.setEntity(new UrlEncodedFormEntity(bodyParams, HTTP.UTF_8));
    post.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
    httpOauthConsumer.sign(post);
    HttpResponse response = client.execute(post);
    return new HttpResponseWrapper(response);
  } 
   
  private ReadableResponse signedGetRequest(String request) throws OAuthMessageSignerException, OAuthExpectationFailedException, OAuthCommunicationException, ClientProtocolException, IOException{
    HttpClient client = new DefaultHttpClient();
    HttpGet get = new HttpGet(request);
    httpOauthConsumer.sign(get);
    HttpResponse response = client.execute(get);
    return new HttpResponseWrapper(response);
  }