Add JSONP Support
thanks for this great library :)
i am working on mobile app under ionicframework.com
is there any possibility to configure JDrupal to work through Jsonp ?
@moussaoui91 you're welcome. I am not very familiar with JSONP, so I'm not quite sure what is involved. Will you please provide a simple example of JSONP? Say for example, which service resource(s) are you trying to work with first? Do you have the JSONP syntax that is necessary for them? Either way, I would like to add support for it, I just personally haven't needed it yet (nor have any of my clients).
As i said before, i was working on mobile app under ionicframework.com,
open source front-end SDK for developing hybrid mobile apps with HTML5.
so i need your library JDrupal to do the communication with my drupal service.
The mobile app SDK (mobile localhost i think) have to request data from Drupal server within defrent domain (www.drupalexamplesite.com)
so it cuz the error
XMLHttpRequest cannot load http://www.drupalexamplesite.com/site//?q=services/session/token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
this problem can solved by sending the request with JSONP technique.
JSONP or "JSON with padding" is a communication technique used in JavaScript programs running in web browsers to request data from a server in a different domain
http://en.wikipedia.org/wiki/JSONP
fortunately, service drupal module support JSONP as an option at stile options.
@moussaoui91 That's good the Services module offers JSONP support. Until I (or a client) needs JSONP support, I won't be able to dedicate any resources to it. If you work well with JSONP, I would appreciate advice on how support can be added.
Until then, when working with localhost and a remote Drupal server, you can use Google Chrome and disable web security: http://www.drupalgap.org/node/223