This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL url = new URL("http://www.example.com/tset"); | |
Map<String,Object> params = new LinkedHashMap<>(); | |
params.put("test", "가나다"); | |
StringBuilder postData = new StringBuilder(); | |
for (Map.Entry<String,Object> param : params.entrySet()) { | |
if (postData.length() != 0) postData.append('&'); | |
postData.append(URLEncoder.encode(param.getKey(), "UTF-8")); | |
postData.append('='); | |
postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String,Object> params = new LinkedHashMap<>(); | |
params.put("test", "가나다"); | |
StringBuilder postData = new StringBuilder(); | |
for (Map.Entry<String,Object> param : params.entrySet()) { | |
if (postData.length() != 0) postData.append('&'); | |
postData.append(URLEncoder.encode(param.getKey(), "UTF-8")); | |
postData.append('='); | |
postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8")); | |
} |