cancel
Showing results for 
Search instead for 
Did you mean: 

Consume Odata Service in ajax

Mahmoud-Farag
Participant
0 Kudos
411

Dears,

I need to consume Odata Service in ajax, I create an UI5 (To Do List) , I consumed an API normally,
but when consume Odata Service in ajax I did not get any data in the model.

Note: I did not use destination in my app , I am just want to consume it like API .

Based on my search I think it could be CORS error , maybe the model can not read the response.
if anyone have an advice or code .
Thanks

v BA

Accepted Solutions (0)

Answers (2)

Answers (2)

Tukutupap
Participant
0 Kudos

Check this out.

junwu
SAP Champion
SAP Champion
0 Kudos

if your app is loaded from server A, your ajax call can only call service having the same host/url

if you want to call service from other place instead of A, you have to use destination

junwu
SAP Champion
SAP Champion
0 Kudos

if you are on-premise case, you have to use web dispatcher