public static String encodeParameters ( SignableRequest < ? > request ) { final Map < String , List < String > > requestParams = request . getParameters ( ) ; if ( requestParams . isEmpty ( ) ) return null ; final List < NameValuePair > nameValuePairs = new ArrayList < NameValuePair > ( ) ; for ( Entry < String , List < String > > entry : requestParams . entrySet ( ) ) { String parameterName = entry . getKey ( ) ; for ( String value : entry . getValue ( ) ) { nameValuePairs . add ( new BasicNameValuePair ( parameterName , value ) ) ; } } return URLEncodedUtils . format ( nameValuePairs , DEFAULT_ENCODING ) ; }
Creates an encoded query string from all the parameters in the specified request .