title: Parse.com Rest Api - Sign Up - error: "unauthorized"
body: <p>Could you please help me debug my http request. I am trying to create a user but I keep getting error: "unauthorized"</p>
  
  <p><img src="https://i.stack.imgur.com/n5k6g.png" alt="Request"></p>
  
  <p>Here is a snippet of my code:</p>
  
  <pre><code>app.factory('userFactory', function($http){
      return {
          signUp: function(username, password) {
              var config = {
                  headers: {
                      'X-Parse-Application-Id': ParseAppId,
                      'X-Parse-REST-API-Key': ParseRestApiKey,
                      'Content-Type': 'application/json'
                  },
                  data: {
                      'username': username,
                      'password': password
                  }
              }
              return $http.post('https://api.parse.com/1/users', config);
          },
          logIn: function(username, password) {
              var config = {
               headers: {
                 'X-Parse-Application-Id': ParseAppId,
                 'X-Parse-REST-API-Key': ParseRestApiKey
               },
               params: { 
                  username: username ,
                  password: password
                }
              }
              return $http.get('https://api.parse.com/1/login', config);
          }
      };
  });
  </code></pre>
  
  <p>Login works fine so App Id and Rest Api key are fine.
  Thanks you very much!</p>