title: Backbone Sync return an empty $_POST array
body: <p>I'm trying to do my first RESTful app with Backbone and Yii Framework. 
  I had no problem with the GET methods but I'm stuck now with the POST method, to create a new element.</p>
  
  <p>I have a Comment model in Backbone:</p>
  
  <pre><code>var commentModel = Backbone.Model.extend({
  
      urlRoot: "index.php/api/comments",
      idAttribute: 'id',
  
      defaults: {
          content: "Empty comment",
          status: 1
      }
  });
  </code></pre>
  
  <p>In my view I add a function to create a new Comment passing the values from the relative form: </p>
  
  <pre><code>on_submit: function(e) {
              var new_comment = new Comment({author_id: this.$('#author_text').val(), content: this.$('#content_text').val(), post_id: this.$("#post_text").val(), status: this.$("#status_text").val()});
  
           new_comment.save();
          },
  </code></pre>
  
  <p>Looking the request with Firebug it seems all right, in the POST tab I can see all the values:</p>
  
  <pre><code>JSON            
  author_id "7"   
  content "Epic fail"
  post_id "7" 
  status "2"
  
  Source 
  {"content":"Epic fail","status":"2","author_id":"7","post_id":"7"}
  </code></pre>
  
  <p>But in my php Api the $_POST var is empty!</p>
  
  <pre><code>foreach($_POST as $var=&gt;$value) {
  
       if($model-&gt;hasAttribute($var))
          $model-&gt;$var = $value;
       else
          $this-&gt;_sendResponse(500);
  }
  </code></pre>
  
  <p>Anyone has some ideas? Reading the documentation of Backbone.Sync I understand that it should use POST for create request.</p>
  
  <p>I found a workaround getting the values from:</p>
  
  <pre><code>file_get_contents('php://input') 
  </code></pre>
  
  <p>but id doesn't feel right to me...</p>
  
  <p>Thanks.</p>