Batch POST tunneling

Jul 24, 2012 at 4:40 PM


I am having problems with my app in server.

Basically it is due to server does not accept MERGE or DELETE for method.

I have been asked to modify the batch to use POST tunneling. I tried something like this for to build every quest: request = { requestUri: serviceURL + entityName + "(" + condition + ")", method: "POST", data: null, headers: { "X-HTTP-Method": "DELETE"} };

Those request are putted into an array called changeRequests.

Finally when I execute the request it is falling.



requestUri: this.serviceUrl + "$batch",               

method: "POST",               

data: { __batchRequests: [{ __changeRequests: changeRequests}] }           


It would be great if you could refer me to an example using batch with POST tunneling