http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/