private HttpEntity executePost(String url,String[][] postParams,String[][] headerParams) throws IOException {
  List<NameValuePair> formparams=new ArrayList<NameValuePair>();
  for (  String[] param : postParams) {
    if (param[0] != null && param[1] != null) {
      formparams.add(new BasicNameValuePair(param[0],param[1]));
    }
  }
  UrlEncodedFormEntity entity=new UrlEncodedFormEntity(formparams,"UTF-8");
  return executePost(url,entity,headerParams);
}

private HttpEntity executePost ( String url , String [ ] [ ] postParams , String [ ] [ ] headerParams ) throws IOException { List < NameValuePair > formparams = new ArrayList < NameValuePair > ( ) ; for ( String [ ] param : postParams ) { if ( param [ 0 ] != null && param [ 1 ] != null ) { formparams . add ( new BasicNameValuePair ( param [ 0 ] , param [ 1 ] ) ) ; } } UrlEncodedFormEntity entity = new UrlEncodedFormEntity ( formparams , "UTF-8" ) ; return executePost ( url , entity , headerParams ) ; }
executes post request on given url with post parameters and header parameters .
