Support JSON based POST, PUT, DELETE in client

Change-Id: I54a1f8471331a4b111ee4da8faffe4f15a2a9d96
This commit is contained in:
Shawn O. Pearce
2012-11-15 22:26:39 -08:00
parent d8028003ab
commit 02355b009b
6 changed files with 72 additions and 20 deletions

View File

@@ -25,14 +25,14 @@ public class DashboardMap extends NativeMap<DashboardInfo> {
public static void allOnProject(Project.NameKey project,
AsyncCallback<DashboardMap> callback) {
new RestApi("/dashboards/project/" + URL.encode(project.get()).replaceAll("[?]", "%3F"))
.send(NativeMap.copyKeysIntoChildren(callback));
.get(NativeMap.copyKeysIntoChildren(callback));
}
public static void projectDefault(Project.NameKey project,
AsyncCallback<DashboardMap> callback) {
new RestApi("/dashboards/project/" + URL.encode(project.get()).replaceAll("[?]", "%3F"))
.addParameterTrue("default")
.send(NativeMap.copyKeysIntoChildren(callback));
.get(NativeMap.copyKeysIntoChildren(callback));
}
protected DashboardMap() {