Search code examples
cross-domainparse-platformrestful-architecture

How would RESTful API for Parse work for HTML application?


Parse is a Backend-as-Service platform that offers RESTful API for data storage and query. It seems very appealing for front-end or mobile developer and allows them to focus on business logic without worry about those troublesome back-end technologies.

The RESTful endpoint looks something like this:

https://api.parse.com/1/classes/GameScore

If I want to use this on my site, say awesomehtmlsite.com, wouldn't the request be blocked by cross domain restrictions? Same would hold true for the Javascript API.

Can someone explain to me how I can utilize the RESTful API or the Javascript API?


Solution

  • Responses to calls to the Parse javascript API include the following header:

    Access-Control-Allow-Origin:*

    This allows it to be used cross-domain. You should just be able to follow the JavaScript guide/API that Parse provides, without worrying about cross-domain issues.