title: How to get a query string for a url using httpUrlConnection , android
body: <p>I am using HttpUrlConnection to post a query to a webpage. The web page take my request and does another posting. For example: www.unknown.com</p>
  
  <pre><code>URL url = new URL("http://www.unknown.com"); //$NON-NLS-1$
  urlConnection = (HttpURLConnection) url.openConnection();
  urlConnection.setReadTimeout(15*1000);
  urlConnection.setDoInput(true);
  urlConnection.setDoOutput (true);
  urlConnection.setUseCaches (false);
  urlConnection.setAllowUserInteraction(true);
  out = new OutputStreamWriter(urlConnection.getOutputStream());
  string content = "var1=5&amp;var2=0&amp;var3=6"; //$NON-NLS-1$
  out.write(content);
  out.flush();
  out.close();
  </code></pre>
  
  <p>The code is working without problem and  I am getting the html code. The problem is that the webpage is proceeding another HTTP "POST" method when it is taking my request. For example after my request the URI is: <a href="http://www.unknown.com?var1=5&amp;var2=0&amp;var3=6&amp;var4=1500" rel="nofollow">http://www.unknown.com?var1=5&amp;var2=0&amp;var3=6&amp;var4=1500</a></p>
  
  <p>I need to get the value of "var4" in my code and I can not find any solution for this. HttpUrlConnection.getUrl() returns just the address <a href="http://www.unknown.com" rel="nofollow">http://www.unknown.com</a>! Have anybody a suggestion? Thanks.</p>