title: PostMethod setRequestBody(String) deprecated - why?
body: <p>I am using Apache Commons HttpClient PostMethod 3.1.</p>
  
  <p>In the PostMethod class there are also three methods for setting POST method's request body:</p>
  
  <pre><code>setRequestBody(InputStream body)
  setRequestBody(String body)
  setRequestBody(NameValuePair[] parametersBody);
  </code></pre>
  
  <p><a href="http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/NameValuePair.html" rel="noreferrer">NameValuePair</a> API <br><br>
  First two methods are deprecated. Does anybody knows why? Because if I want to put an XML to request body, NameValuePair does not help me. </p>
  
  <p>Does anybody knows an workaround or a solution?</p>