I downloaded the Rest Client library from here and the Curl library for CodeIgniter from here.
I put both the libraries in a library folder and set them in auto load library.
Now when I try to run the following code:
class Api extends CI_Controller {
function index()
{
$this->load->spark('restclient/2.1.0');
$this->load->library('rest', array(
'server' => 'my rest service url',
));
$data = $this->rest->get();
echo '<pre>';
print_r($data);
}
}
I'm getting the following error:
Fatal error: Call to undefined method CI_Loader::spark() in /opt/lampp/htdocs/code/application/libraries/Rest.php on line 60
What am I doing wrong?