See the article
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
The master project repository is
https://github.com/chriskacerguis/codeigniter-restserver
Click on the links to check whether the REST server is working.
- Users - defaulting to JSON
- Users - get it in CSV
- User #1 - defaulting to JSON (users/id/1)
- User #1 - defaulting to JSON (users/1)
- User #1 - get it in XML (users/id/1.xml)
- User #1 - get it in XML (users/id/1/format/xml)
- User #1 - get it in XML (users/id/1?format=xml)
- User #1 - get it in XML (users/1.xml)
- Users - get it in JSON (AJAX request)
- Users - get it in HTML (users.html)
- Users - get it in HTML (users/format/html)
- Users - get it in HTML (users?format=html)