title: Update records using Salesforce REST API - Patch method not working
body: <p>I'm trying to update a record residing in salesforce table. Im using the Java HttpClient REST API to do the same. Getting an error when we use PATCH to update a record in Salesforce.</p>
  
  <pre><code>PostMethod post = new PostMethod(
      instanceUrl + "/services/data/v20.0/sobjects/" +
      objectName + "/" + Id + "?_HttpMethod=PATCH"
  );
  </code></pre>
  
  <p>[{"message":"HTTP Method 'PATCH' not allowed. Allowed are HEAD,GET,POST","errorCode":"METHOD_NOT_ALLOWED"}]</p>
  
  <p>Also tried doing the following:</p>
  
  <pre><code>PostMethod post = new PostMethod(
      instanceUrl + "/services/data/v20.0/sobjects/" + objectName + "/" + Id)
      {
          public String getName() { return "PATCH"; 
      }
  };
  </code></pre>
  
  <p>This also returns the same error. We are using apache tomcat with commons-httpclient-3.1.jar library. Please advise on how this can be done.</p>