コード例 #1
0
 String createRequest(int id, String xsrfKey, String methodName, Collection<Object> args) {
   JsonRequest msg = new JsonRequest();
   msg.method = methodName;
   if (args != null) {
     for (Object arg : args) {
       msg.params.add(arg);
     }
   }
   msg.id = id;
   msg.xsrfKey = xsrfKey;
   return gson.toJson(msg, msg.getClass());
 }
コード例 #2
0
 public JsonRequestBuilder method(String method) {
   jsonRequest.method = method;
   return this;
 }