I am newbee for OData V4. I had implement CRUD Operation easily with Web API with oData V4.
But I do not understand that how can I perform batch request using JSON. I visited below links also :
http://www.odata.org/documentation/odata-version-3-0/batch-processing/ http://www.odata.org/documentation/odata-version-3-0/batch-processing/
But could not get idea to performing batch operation using JSON.
Below is code sample for perform multiple get.
$.ajax({
url: 'http://localhost:52603/odata/$batch',
contentType: 'multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b',
data: {
__batchRequests: [
{ requestUri: "Employee", method: "GET" },
{ requestUri: "Country", method: "GET" }
]
},
success: function (data) {
alert(data);
console.log(data);
}
});
Any kind of help would be appreciate.