i've during my localhost:8111 a restlet application running. This application possess a ServerResource that respond http demands from the javascript api that i am doing.

This Javascript api is running during my apache in localhost, and i wish to do http request towards the localhost:8111, however i can't for that mix domain problem.

The restlet response in json, which solution is the greatest within this situation?


Just like every other situation.

  • CORS if you would like control and are prepared to sacrifice some mix-browser support.
  • JSON-P if you're able to accept GET only demands with no security that sites can trigger the request
  • A proxy on a single origin if you do not require the final server to obtain qualifications from the customer