title: How to send a HTTP POST request using HttpClient 4 in Java?
body: <p>So I've struggling with this one lately. There are multiple ways to make a HTTP POST request with Java, some of which demonstrate with <code>HttpClient</code> 3.x and the others with <code>HttpClient</code> 4.x</p>
  
  <p>I'm assuming that the 4.x line is more advanced, but there are also lacking tutorials with this one. At least for me, I had hard time to find some beginner friendly guides.</p>
  
  <p>I'd like to make a POST request with an encoded <code>File</code> object.</p>
  
  <p>Some of the tutorials I've followed also mentioned <code>NameValuePair</code>, but for me this class is not available and I don't know how to obtain it. So if you answer, please mention how I can get hold of the imports as well.</p>
  
  <p>Please demonstrate a minimal HTTP POST request with <code>HttpClient</code> 4.x</p>