Ah, interesting. osapi has two transports -- gadgets.rpc or json-rpc
Shindig server json-rpc endpoints support CORS and JSONP, both of which can be used for cross-domain requests. However the current js side code doesn't support JSONP as of yet (but it would not be difficult to do so) Another option is using an invisible iframe to the target domain you want to send requests to. In that iframe use gadgets.rpc to set up a channel to handle requests. On Wed, Aug 11, 2010 at 2:11 PM, Randy Watler <[email protected]> wrote: > Shindig Dev Team: > > Practically speaking, does the gadgets container page have to be served > from the Shindig server's domain to utilize the osapi? > > I do see that osapi is generally made available in the new common > container, but I am using the old shindig container support since it handles > chrome and other things that do not appear to be available in the common > container yet. I am also following guidelines from the wiki that strongly > suggest the container/page domain be different than the shindig/gadgets > domain. Thus, some complexities seem to arise. > > What I am after is an additional osapi service I can use from the > container, (e.g. a preferences service that can integrate with a client side > container UserPrefs implementation). However, when I try to include the > osapi service when I load the container javascript, it adopts the domain of > the page which is not the same as the Shindig server's domain. I do see > where the configuration can be changed from "%host%" to something more > specific, but this would then appear to result in a cross domain XHR > request. Of course, that might be fine in a CORS world, but I am wondering > if I am headed in the right direction at this point? > > Any advice more than welcome! Thanks in advance, > > Randy Watler > > -- Paul Lindner -- [email protected] -- linkedin.com/in/plindner
