Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
2.5
-
Windows XP Professional, MySQL database, XWiki 2.4, XWiki REST resources
Description
The error is an HTML Error '405' method not allwed using the PUT services to update a page or add a tag to a page for the RESTful API:
Page 'PUT'
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HPageresources
Tag 'PUT'
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HTagresources
I created a javascript extension and added a function to update a page with a word,
updatePage = function(cont) { var encodeTag = encodeURIComponent(tag); // var params = new Hash({'tag' : encodeTag, '}); var updatePageURl = XWiki.contextPath + '/rest/wikis/' + encodeURIComponent(XWiki.currentWiki) + '/spaces/' + encodeURIComponent(XWiki.currentSpace) + '/pages/' + encodeURIComponent(XWiki.currentPage)+'?media=text/plain&postBody='+cont; new Ajax.Request(updatePageURL, {method: 'PUT'}); } addTag = function(tag) { var encodeTag = encodeURIComponent(tag); // var params = new Hash({'tag' : encodeTag, '}); var addTagURL = XWiki.contextPath + '/rest/wikis/' + encodeURIComponent(XWiki.currentWiki) + '/spaces/' + encodeURIComponent(XWiki.currentSpace) + '/pages/' + encodeURIComponent(XWiki.currentPage)+'/tags?media=text/plain&postBody='tag; new Ajax.Request(addTagURL, {method: 'PUT'}); }