mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
cleanup
This commit is contained in:
parent
e2c6480992
commit
c2d5f2d253
1 changed files with 5 additions and 4 deletions
|
@ -342,17 +342,18 @@ public class NetUtils {
|
|||
return result;
|
||||
}
|
||||
|
||||
// This handles multiple params but only every gets passed one!
|
||||
private static String getPostDataString( Map<String, String> params )
|
||||
{
|
||||
String result = null;
|
||||
try {
|
||||
ArrayList<String> pairs = new ArrayList<String>();
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
String[] pair = { null, null };
|
||||
// String[] pair = { null, null };
|
||||
for ( Map.Entry<String, String> entry : params.entrySet() ){
|
||||
pair[0] = URLEncoder.encode( entry.getKey(), "UTF-8" );
|
||||
pair[1] = URLEncoder.encode( entry.getValue(), "UTF-8" );
|
||||
pairs.add( TextUtils.join( "=", pair ) );
|
||||
pairs.add( URLEncoder.encode( entry.getKey(), "UTF-8" )
|
||||
+ "="
|
||||
+ URLEncoder.encode( entry.getValue(), "UTF-8" ) );
|
||||
}
|
||||
result = TextUtils.join( "&", pairs );
|
||||
} catch ( java.io.UnsupportedEncodingException uee ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue