title: {"status":false,"error":"Unknown method"} error CodeIgniter RESTful API
body: <pre><code>&lt;?php
  include(APPPATH.'/libraries/REST_Controller.php');
  class Quiz extends REST_Controller{
  function __construct()
  {
      // Call the Model constructor
      parent::__construct();
  }
  public function user_get()
  {
  $this-&gt;load-&gt;model('Quizmodel');
  $data = $this-&gt;Quizmodel-&gt;getAll();
  $this-&gt;response($data, 200);
  } 
  
  function restclient()
  {
  
  $this-&gt;load-&gt;library('rest', array(
      'server' =&gt; 'http://localhost/CodeIg/index.php/quiz/'
  ));
  
  $userr = $this-&gt;rest-&gt;get('user','','json');
  
  echo $userr;
  }
  
  }
  ?&gt;
  </code></pre>
  
  <p>I am able to get JSON output if I type <a href="http://localhost/CodeIg/index.php/quiz/user" rel="nofollow noreferrer">http://localhost/CodeIg/index.php/quiz/user</a> in my browser, however if I type <a href="http://localhost/CodeIg/index.php/quiz/restclient" rel="nofollow noreferrer">http://localhost/CodeIg/index.php/quiz/restclient</a> it gives this error: <code>{"status":false,"error":"Unknown method"}</code></p>
  
  <p>I tried changing <code>get</code> to <code>post</code> but still the same error.</p>
  
  <p>I referred this page <a href="https://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814" rel="nofollow noreferrer">https://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814</a> to do it.</p>