The client code of this demo is slightly based on "RESTful services with jQuery, PHP and the Slim Framework"