private void handleFormParameters ( HttpEntityEnclosingRequestBase httpRequest ) { List < NameValuePair > pairs = map ( formParams . values ( ) , PARAM_MAPPER ) ; HttpEntity entity = new UrlEncodedFormEntity ( pairs , Charset . defaultCharset ( ) ) ; httpRequest . setEntity ( entity ) ; }
Add parameters as form url encoded content . Each parameter is set as a key value entry to request body .