コード例 #1
0
 public static void deleteTask(Task task) {
   NoJsonHttpRequest request =
       new NoJsonHttpRequest(serverUrl, tasksPath + "/" + task.getId(), "DELETE");
   request.addHeaderParameter(authorizationHeaderName, Util.base64Header);
   request.addHeaderParameter("Content-Type", "application/json");
   request.execute();
 }
コード例 #2
0
 public static void updateTask(Task task) {
   Gson gson = new Gson();
   JsonHttpRequest request =
       new JsonHttpRequest(serverUrl, tasksPath + "/" + task.getId(), gson.toJson(task), "PUT");
   request.addHeaderParameter(authorizationHeaderName, Util.base64Header);
   request.addHeaderParameter("Content-Type", "application/json");
   request.execute();
 }