title: Can't insert data via rest api
body: <p>I try using rest api in codeigniter to insert data. </p>
  
  <p>I try this </p>
  
  <pre><code>    public function sensor_post(){
      $data = array(
                  'sensor_id'   =&gt; $this-&gt;input-&gt;post('sensor_id'),
                  'value'       =&gt; $this-&gt;input-&gt;post('value'));
  
      $insert = $this-&gt;db-&gt;insert('measurement', $data);
  
      if ($insert) {
          $this-&gt;response($data, 200);
      } else {
          $this-&gt;response(array('status' =&gt; 'fail', 502));
      }
  
    }
  </code></pre>
  
  <p>And call
         <a href="http://localhost/rest_iot/index.php/iot/sensor?sensor_id=1&amp;value=37" rel="nofollow noreferrer">http://localhost/rest_iot/index.php/iot/sensor?sensor_id=1&amp;value=37</a></p>
  
  <p>I try this in post man and I get error like this. I think I've fill the value, why this is happend?</p>
  
  <pre><code>   &lt;h1&gt;A Database Error Occurred&lt;/h1&gt;
      &lt;p&gt;Error Number: 1048&lt;/p&gt;
      &lt;p&gt;Column 'sensor_id' cannot be null&lt;/p&gt;
      &lt;p&gt;INSERT INTO `measurement` (`sensor_id`, `value`) VALUES (NULL, NULL)&lt;/p&gt;
      &lt;p&gt;Filename: C:/xampp/htdocs/rest_iot/system/database/DB_driver.php&lt;/p&gt;
      &lt;p&gt;Line Number: 691&lt;/p&gt;
  </code></pre>