title: NameValuePair deprecated for openConnection
body: <p>I been following online tutorials on how to insert data into a database from an android app and have everything working except this small part</p>
  
  <pre><code>List&lt;NameValuePair&gt; params = new ArrayList&lt;&gt;();
  params.add(new BasicNameValuePair("username", username));
  params.add(new BasicNameValuePair("password", password));
  </code></pre>
  
  <p>NameValuePair and BasicNameValuePair have been deprecated in favor of <code>openConnection()</code>. How can I create a new-value association with that? <a href="http://developer.android.com/reference/java/net/URL.html#openConnection()">http://developer.android.com/reference/java/net/URL.html#openConnection()</a> </p>
  
  <p>Does anyone know how I can create name value pairs with openConnection? I been searching everywhere.</p>