title: $this->post codeigniter don't work with rest api
body: <p>I tried to work with <code>$this-&gt;post()</code> to get data sent by post in json format. By I can not get any result of for example <code>$this-&gt;post('name')</code>.</p>
  
  <p>This is the code : </p>
  
  <pre><code>&lt;?php
  
  require(APPPATH . '/libraries/REST_Controller.php');
  
  class user_api extends REST_Controller {
  
      function user_post() {
  
                  $user = array(
                      'id' =&gt; null,
                      'firstname' =&gt; $this-&gt;post('firstname'),
                      'lastname' =&gt; $this-&gt;post('lastname')
                  );
  
                  $result = $this-&gt;user_model-&gt;insert($user);
                  if ($result) {
                      $this-&gt;response($result, 200); // 200 being the HTTP response code
                  } else {
                      $this-&gt;response(NULL, 404);
                  }
      }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>data sent on json format to the link  : <a href="http://mydomain.com/myapplication/user_api/user" rel="nofollow">http://mydomain.com/myapplication/user_api/user</a> : </p>
  
  <pre><code>{"firstname":"test",
  "lastname":"test"
  }
  </code></pre>
  
  <p>There is no data in the database like it can not get data from <code>$this-&gt;post('firstname')</code>.</p>
  
  <p>Any idea ????</p>