I am working on integrating Parse with Unity for WebGL. Since the Parse plugin currently doesn't work with WebGL, I am forced to use the REST API (or edit the source code, which hasn't been working). Unfortunately, Parse doesn't have any documentation on how to use the REST API within the Unity/WebGL app, so I'm not even sure if I'm doing it right. Regardless, attempting to sign up with the code I posted below only gives me a "401 Unauthorized" error, at least in the Unity editor (I currently can't test to see if an actual build on my server will do anything different). I've also tried using the Client Key instead of the REST-API Key, but that had the same effect. Could someone give me pointers on where to go from here?
Here's my code:
string url = "https://api.parse.com/1/users";
WWWForm form = new WWWForm();
form.AddField("X-Parse-Application-Id", APP_ID);
form.AddField("X-Parse-REST-API-Key", REST_ID);
form.AddField("X-Parse-Revocable-Session", 1);
form.AddField("Content-Type", "application/json");
string newDataString = "{\"username\":\"" + email + "\",\"password\":\"" + password + "\",\"email\":\"" + email + "\"}";
WWW www = new WWW(url, System.Text.Encoding.UTF8.GetBytes(newDataString), form.headers);