PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Phil Sturgeon's Blog: Video: Set up a REST API with CodeIgniter

Note: This article was originally published at PHPDeveloper on 22 March 2011.
PHPDeveloper

Phil Sturgeon has posted a new screencast to his blog today showing you how to set up a REST controller with CodeIgniter, covering some of of the things you'll need to get up and running.

I wrote up an article on NetTuts last year "Working with RESTful Services in CodeIgniter" hoping that would cover the majority of questions but with new features like API Keys, Limiting and Logging being added I thought a quick run-through was in order. This video covers the basic implementation, HTTP Basic/Digest authentication, format switching and goes onto the new API Key and logging features.

He starts from scratch and creates configuration files, controllers and views. He shows how to create some sample controllers based off of a REST_Controller base and handling the different request types (GET, POST, etc) with different methods. You can find the code for the REST_Controller over on github.