Repository: olingo-odata4-js Updated Branches: refs/heads/master 014949ce9 -> 617809352
Add first 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/61780935 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/tree/61780935 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/diff/61780935 Branch: refs/heads/master Commit: 617809352091d7e71ad4fb0d5a7cbf1f156f7395 Parents: 014949c Author: Sven Kobler <[email protected]> Authored: Tue Jul 22 15:50:47 2014 +0200 Committer: Sven Kobler <[email protected]> Committed: Tue Jul 22 15:50:47 2014 +0200 ---------------------------------------------------------------------- datajs/demo/tester.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4-js/blob/61780935/datajs/demo/tester.html ---------------------------------------------------------------------- diff --git a/datajs/demo/tester.html b/datajs/demo/tester.html index 887ca84..a0982f3 100644 --- a/datajs/demo/tester.html +++ b/datajs/demo/tester.html @@ -40,9 +40,9 @@ <button id="btnJSON_entry_minimal">Entry pure JSON odata.metadata=minimal</button><br/> <button id="btnJSON_entry_minimal_to_full">Entry pure JSON odata.metadata=minimal; extendMetadataToLevel=full</button><br/> <button id="btnJSON_entry_minimal_to_all">Entry pure JSON odata.metadata=minimal; extendMetadataToLevel=all</button><br/> - <button id="btnMetaData">MetaData</button><br/> <button id="btnJSONwithMetaData">JSON with MetaData</button><br/> + <button id="btnPOST_entry_food">POST food entry</button><br/> <div id='resultsArea' data-type="json"> </div> <script> @@ -244,6 +244,22 @@ datajs.V4.oData.read(metadataRequest, metaDatasuccess, errorFunc,datajs.V4.oData.metadataHandler); }); + $('#btnPOST_entry_food').on("click", function(){ + var requestUri = { + requestUri : 'http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/Foods', + method: 'POST', + headers : { Accept : 'application/json' }, + recognizeDates : true, + data : { + "@odata.type": "#DataJS.Tests.V4.Food", + "@odata.context": "http://localhost:4002/tests/endpoints/FoodStoreDataServiceV4.svc/$metadata#Foods/$entity", + FoodID: 111, + Name: "flour1" + } + }; + datajs.V4.oData.read(requestUri, success, errorFunc); + }); + </script> </body> </html> \ No newline at end of file
