Reputation: 57
I am trying to make a sencha touch 2 mobile app. I have a restful api in server and i want to consume that in my mobile app. Which sencha proxy should i use (rest, ajax, jsonp)? Rest and ajax has issue with cross-site domain issue, so jsonp can be the solution. But how can i send jsonp request to rest api if i have parameters?
Upvotes: 0
Views: 619
Reputation: 5021
You can use REST
proxy if your services truly follows REST standards because that way proxy can provide you out-of-the-box functionality to operate on models.
Regarding cross-domain issues, please note that the way app behaves in desktop browser is different from its behaviour when it runs in phone so you are not forced to use JSONP
if you don't want, AJAX
can also work for you. Its good if you can use JSONP but please keep in mind its limitations of having no support for HTTP headers and other useful methods like POST, PUT & DELETE.
Please go through this for more information : How to use json proxy to access remote services during development
Upvotes: 1