You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2014/07/22 16:01:12 UTC
git commit: Add second testcase for PUT
Repository: olingo-odata4-js
Updated Branches:
refs/heads/master 617809352 -> 3b9342cbb
Add second testcase for PUT
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/commit/3b9342cb
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/3b9342cb
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/3b9342cb
Branch: refs/heads/master
Commit: 3b9342cbb23e8cfa899781b9d6933fd27794bb02
Parents: 6178093
Author: Sven Kobler <sv...@sap.com>
Authored: Tue Jul 22 16:00:59 2014 +0200
Committer: Sven Kobler <sv...@sap.com>
Committed: Tue Jul 22 16:00:59 2014 +0200
----------------------------------------------------------------------
datajs/demo/tester.html | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/3b9342cb/datajs/demo/tester.html
----------------------------------------------------------------------
diff --git a/datajs/demo/tester.html b/datajs/demo/tester.html
index a0982f3..fdb5e75 100644
--- a/datajs/demo/tester.html
+++ b/datajs/demo/tester.html
@@ -43,6 +43,7 @@
<button id="btnMetaData">MetaData</button><br/>
<button id="btnJSONwithMetaData">JSON with MetaData</button><br/>
<button id="btnPOST_entry_food">POST food entry</button><br/>
+ <button id="btnPOST_entry_categorie">POST categorie entry</button><br/>
<div id='resultsArea' data-type="json">
</div>
<script>
@@ -259,6 +260,22 @@
};
datajs.V4.oData.read(requestUri, success, errorFunc);
});
+ $('#btnPOST_entry_categorie').on("click", function(){
+
+ var requestUri = {
+ requestUri : 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Categories',
+ method: 'POST',
+ headers : { Accept : 'application/json' },
+ recognizeDates : true,
+ data : {
+ "@odata.type": "#DataJS.Tests.V4.Category",
+ "@odata.context": "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Categories/$entity",
+ CategoryID: 111,
+ Name: "cat111"
+ }
+ };
+ datajs.V4.oData.read(requestUri, success, errorFunc);
+ });
</script>
</body>