title: Android, Java: HTTP POST Request
body: <p>I have to do a http post request to a web-service for authenticating the user with username and password. The Web-service guy gave me following information to construct HTTP Post request.</p>
  
  <pre><code>POST /login/dologin HTTP/1.1
  Host: webservice.companyname.com
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 48
  
  id=username&amp;num=password&amp;remember=on&amp;output=xml
  </code></pre>
  
  <p>The XML Response that i will be getting is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;login&gt;
   &lt;message&gt;&lt;![CDATA[]]&gt;&lt;/message&gt;
   &lt;status&gt;&lt;![CDATA[true]]&gt;&lt;/status&gt;
   &lt;Rlo&gt;&lt;![CDATA[Username]]&gt;&lt;/Rlo&gt;
   &lt;Rsc&gt;&lt;![CDATA[9L99PK1KGKSkfMbcsxvkF0S0UoldJ0SU]]&gt;&lt;/Rsc&gt;
   &lt;Rm&gt;&lt;![CDATA[b59031b85bb127661105765722cd3531==AO1YjN5QDM5ITM]]&gt;&lt;/Rm&gt;
   &lt;Rl&gt;&lt;![CDATA[username@company.com]]&gt;&lt;/Rl&gt;
   &lt;uid&gt;&lt;![CDATA[3539145]]&gt;&lt;/uid&gt;
   &lt;Rmu&gt;&lt;![CDATA[f8e8917f7964d4cc7c4c4226f060e3ea]]&gt;&lt;/Rmu&gt;
  &lt;/login&gt;
  </code></pre>
  
  <p>This is what i am doing    HttpPost postRequest = new HttpPost(urlString); How do i construct the rest of the parameters?</p>