title: AngularJs $http.post() does not send data
body: <p>Could anyone tell me why the following statement does not send the post data to the designated url? The url is called but on the server when I print $_POST - I get an empty array. If I print message in the console before adding it to the data - it shows the correct content.</p>
  
  <pre><code>$http.post('request-url',  { 'message' : message });
  </code></pre>
  
  <p>I've also tried it with the data as string (with the same outcome):</p>
  
  <pre><code>$http.post('request-url',  "message=" + message);
  </code></pre>
  
  <p>It seem to be working when I use it in the following format:</p>
  
  <pre><code>$http({
      method: 'POST',
      url: 'request-url',
      data: "message=" + message,
      headers: {'Content-Type': 'application/x-www-form-urlencoded'}
  });
  </code></pre>
  
  <p>but is there a way of doing it with the $http.post() - and do I always have to include the header in order for it to work? I believe that the above content type is specifying format of the sent data, but can I send it as javascript object?</p>