How to add parameters to HttpURLConnection using POST using NameValuePair

I am trying to do POST with HttpURLConnection(I need to use it this way, can’t use HttpPost) and I’d like to add parameters to that connection such as post.setEntity(new UrlEncodedFormEntity(nvp)); where nvp = new ArrayList<NameValuePair>(); having some data stored in. I can’t find a way how to add this ArrayList to my HttpURLConnection which is … Read more