title: AngularJS can't sent POST request to SLIM Framework
body: <p>Hello I have this angularjs http.post() request  to slim php framework.</p>
  
  <pre><code>  'use strict';
  
     soup.factory('loginService',function($http){
      return {
          login:function(user){
                           console.log(user);
  
              var $promise = $http.post('api/vendor/slim/slim',user );
              return $promise;
      };
  });
  </code></pre>
  
  <p>when I debug the <code>$_POST</code> it always return an empty array,</p>
  
  <p>but when I use use <code>json_decode(file_get_contents('php://input'))</code>, slim php will return an error.</p>
  
  <p>this is php function that handle the request.</p>
  
  <pre><code>function login(){
      $sql = "SELECT * FROM users ORDER by id";
       try {
          $db = getConnection();
          $stmt = $db-&gt;query($sql);
          $users = $stmt-&gt;fetchAll(PDO::FETCH_OBJ);
          $db = null;
          //print_r($users);
          $users = json_encode($users);
  
  
      } catch(PDOException $e) {
          echo '{"error":{"text":'. $e-&gt;getMessage() .'}}';
      }
  
      var_dump($_POST);
      $test = json_decode(file_get_contents('php://input'));
  
      //do something with the post data
  
  
  
  }
  </code></pre>
  
  <p>how can I solve this?</p>