0

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?

1 Answer 1

1

I think you have to install spark. Look these links

http://net.tutsplus.com/tutorials/php/easy-package-management-for-codeigniter-with-sparks/

http://ellislab.com/blog/entry/a-quick-look-at-sparks

Regards

iijb

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.