|
9 | 9 |
|
10 | 10 | import java.io.IOException; |
11 | 11 | import java.io.UnsupportedEncodingException; |
| 12 | +import java.nio.charset.StandardCharsets; |
12 | 13 | import java.util.ArrayList; |
13 | 14 | import java.util.Arrays; |
14 | 15 | import java.util.HashMap; |
@@ -174,6 +175,8 @@ protected Object execute(CommandEnum command, Object... parameters) throws Multi |
174 | 175 | // Generate the entity and initialize request |
175 | 176 | StringEntity rpcEntity = prepareRpcEntity(entityValues); |
176 | 177 | httppost.setEntity(rpcEntity); |
| 178 | + |
| 179 | + System.out.println(new String(httppost.getEntity().getContent().readAllBytes(), StandardCharsets.UTF_8)); |
177 | 180 | // Execute the request and get the answer |
178 | 181 | return executeRequest(); |
179 | 182 |
|
@@ -219,7 +222,7 @@ private Object executeRequest() throws IOException, ClientProtocolException, Mul |
219 | 222 |
|
220 | 223 | private Map<String, Object> prepareMap(CommandEnum command, Object... parameters) { |
221 | 224 | Map<String, Object> entityValues = new HashMap<String, Object>(); |
222 | | - entityValues.put("id", UUID.randomUUID().toString()); |
| 225 | + entityValues.put("id", UUID.randomUUID().toString( )); |
223 | 226 | entityValues.put("method", command.toString().toLowerCase()); |
224 | 227 | List<Object> paramList = new ArrayList<Object>(Arrays.asList(parameters)); |
225 | 228 | entityValues.put("params", paramList); |
|
0 commit comments