Cross-domain REST proxy with Javascript, HTML5
Posted
by Bosh
on Stack Overflow
See other posts from Stack Overflow
or by Bosh
Published on 2010-06-15T04:37:09Z
Indexed on
2010/06/15
4:42 UTC
Read the original article
Hit count: 325
I'm writing a service (say, service.com) that provides a REST API to external apps running inside of IFrames. (These apps are hosted from domains outside the service.com).
I'm planning a javascript client library for the apps to make pure-javascript requests to the service.com REST API -- basically using postMessage and some ad-hoc encapsulation of my API calls to get messages back and forth across frames (from the outside-app.com IFrame --> service.com REST API, and back to the IFrame with a response).
My question: is there any robust, general-purpose javascript library to accomplish the kind of cross-domain REST request proxying I need, or should I just hack it from scratch?
© Stack Overflow or respective owner