
$.ajax({
url: "https://YOUR_SYSTEM/sap/byd/odata/cust/v1/your_service/Collection..",
type: 'GET', /* or POST or DELETE or PUT or PATCH or MERGE */
datatype: 'json',
data: { amount: '12.34' },
success: function(oResult) { /* do something */ }
error: function(oResult) { /* do something */ }
});
$.ajax({
url: "https://YOUR_SYSTEM/sap/byd/odata/cust/v1/your_service/Collection..",
type: 'POST',
headers: { 'x-http-method': 'MERGE' /* or PUT or PATCH or DELETE */ },
datatype: 'json',
data: { amount: '12.34' },
success: function(oResult) { /* do something */ }
error: function(oResult) { /* do something */ }
});
$.post(
"https://YOUR_SYSTEM/sap/byd/odata/cust/v1/your_service/YourCollection",
oData,
function(oResult) { /* do something */ }
);
$.get("https://.../your_service/YourCollection...",
function(oResult) { /* do something */ }
);
$.get("https://.../your_service/YourCollection('...')",
function(oResult) { /* do something */ }
);
$.ajax({
url: "https://.../your_service/YourCollection('...')",
type: 'POST',
headers: { 'x-http-method': 'PUT' },
datatype: 'json',
data: { ObjectID: '0123...CDEF', amount: '12.34' },
success: function() { /* do something */ },
error: function(oError) { /* do something */ }
});
$.ajax({
url: "https://.../your_service/YourCollection('...')",
type: 'POST',
headers: { 'x-http-method': 'MERGE' /* or PATCH */ },
datatype: 'json',
data: { ObjectID: '0123...CDEF', amount: '12.34' },
success: function() { /* do something */ },
error: function(oError) { /* do something */ }
});
$.ajax({
url: "https://.../your_service/YourCollection('...')",
type: 'POST',
headers: { 'x-http-method': 'DELETE' },
success: function() { /* do something */ }
error: function(oError) { /* do something */ }
});
$.ajax({
url: "https://.../your_service/your_function_import",
type: 'GET', /* or DELETE or POST or PUT */
datatype: 'json',
data: { amount: '12.34' },
success: function(oResult) { /* do something */ }
error: function(oError) { /* do something */ }
});
$.ajaxSetup({
beforeSend: function(oXhr) {
oXhr.setRequestHeader("X-CSRF-Token", sTheToken);
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |