title: On Android, make a POST request with URL Encoded Form data without using UrlEncodedFormEntity
body: <p>I have a string that is already in the proper URLEncoded Form format and would like to send it through a POST request on Android to a PHP server. I know the method for sending URL encoded forms on Android uses the <a href="http://developer.android.com/reference/org/apache/http/client/entity/UrlEncodedFormEntity.html"><code>UrlEncodedFormEntity</code></a> and I know <a href="http://www.androidsnippets.org/snippets/36/index.html">how to use it</a>. The problem with that is that the data comes into the function already URL encoded and joined by ampersands, so using <code>UrlEncodedFormEntity</code> would involve a lot of extra work to turn it into a <code>List</code> of <code>NameValuePairs</code> and I'd rather not.</p>
  
  <p><strong>So, how do I make a proper POST request sending this string as the content body?</strong></p>
  
  <p>I have already tried using <a href="http://developer.android.com/reference/org/apache/http/entity/StringEntity.html"><code>StringEntity</code></a>, but the PHP server didn't get any of the data (empty <code>$_POST</code> object).</p>
  
  <p>I am testing against <a href="http://test.lifewanted.com/echo.json.php">http://test.lifewanted.com/echo.json.php</a> which simply is</p>
  
  <pre><code>&lt;?php echo json_encode( $_REQUEST );
  </code></pre>
  
  <p>Here is an example of the already-encoded data:</p>
  
  <blockquote>
    <p>partnerUserID=email%40example.com&amp;partnerUserSecret=mypassword&amp;command=Authenticate</p>
  </blockquote>