So I’m developing a Sencha (Javascript) app which needs to make Ajax http requests to a REST service that is already in place on a different domain. I need a solution to be able to make POST, PUT, and GET requests from my Sencha javascript to that service. I have no control over the service so I cannot make any changes on that end. I have heard of HTML5’s new postMessage() method, but I am unsure how to use or if I am even able to use it to do what i want. Of course, I could disable browser security while in development but that is not a permanent solution. Any suggestions?
In particular, if someone could inform me of the use(s) of the postMessage method, I would be most grateful.
If the response is JSON, you can use JSONP. If you are posting, use a hidden Iframe.