You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/02/21 21:00:29 UTC
svn commit: r629959 -
/incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js
Author: jsdelfino
Date: Thu Feb 21 12:00:28 2008
New Revision: 629959
URL: http://svn.apache.org/viewvc?rev=629959&view=rev
Log:
Fixed construction of URIs on get, post, delete, added missing '/'.
Modified:
incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js
Modified: incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js?rev=629959&r1=629958&r2=629959&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js (original)
+++ incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/binding-atom.js Thu Feb 21 12:00:28 2008
@@ -43,9 +43,10 @@
}
}
}
- xhr.open("GET", uri + id, true);
+ xhr.open("GET", uri + '/' + id, true);
xhr.send(null);
}
+
this.post = function (entry, responseFunction) {
var xhr = this.createXMLHttpRequest();
xhr.onreadystatechange = function() {
@@ -66,6 +67,7 @@
xhr.setRequestHeader("Content-Type", "application/atom+xml");
xhr.send(entry);
}
+
this.put = function (id, entry, responseFunction) {
var xhr = this.createXMLHttpRequest();
xhr.onreadystatechange = function() {
@@ -82,10 +84,11 @@
}
}
}
- xhr.open("PUT", uri + id, true);
+ xhr.open("PUT", uri + '/' + id, true);
xhr.setRequestHeader("Content-Type", "application/atom+xml");
xhr.send(entry);
}
+
this.del = function (id, responseFunction) {
var xhr = this.createXMLHttpRequest();
xhr.onreadystatechange = function() {
@@ -97,7 +100,7 @@
}
}
}
- xhr.open("DELETE", uri + id, true);
+ xhr.open("DELETE", uri + '/' + id, true);
xhr.send(null);
}
this.createXMLHttpRequest = function () {
@@ -132,4 +135,5 @@
}
}
}
-bindingatom = "loaded";
\ No newline at end of file
+
+bindingatom = "loaded";
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org