Reputation: 96827
I saw this article: http://mobile.dzone.com/articles/playing-parsecom-api, and I liked their example JS code:
var user = new Parse.User();
user.set("username", "ElMacho");
user.set("password", "chicken");
user.set("email", "[email protected]");
user.signUp(null, {
success: function(user) {
// Everything's done!
console.log(user.id);
},
error: function(user, error) {
alert("Error: " + error.code + " " + error.message);
}
});
I'd like to understand how this works, and to confirm my hunch. Did they enable CORS on their servers, to make this possible?
Upvotes: 0
Views: 98
Reputation: 10081
You can check yourself :)
Open up fiddler or some other network traffic analyser. If there is an OPTIONS call made with CORS headers then you will know it is using CORS. I would suggest that it must be if the request is being made cross origin.
Upvotes: 1