0
votes

I have two read odata(V2 Version) call for my application. For this, I have tried batch operation. But I stuck somewhere. Because my second odata call input is depend on first odata call output. Is it possible to send the two calls at a time in batch(V2 Odata Model)?

Regards Karthik S

1
Never use batch if one odata call output is depend on another.techippo.com
Can you provide request(s)? And fragment of EDM, without this its hard to answer any odata related questions.donMateo
Just make a single call "1" and in "success" method - execute the "2" passing whatever data from the "1" result. P.S. using nested callbacks is not a good approach due to callback hell problem. You can "promisify" calls and use a chain of "then".Andrii Naumovych

1 Answers

0
votes

It is not possible to group dependent calls into a single $batch.

But you may be able to design it better. If the first call gets data from the backend which is input to the second call, why can't the second call fetch the same input data directly from backend instead of from output of the first call?