I installed the REST API using the Slim PHP platform, which works great when using ie requests http://mysite.com/class/id .
But when I go to http://mysite.com/ , I get the following error in Safari:
Safari cannot open the "http://mysite.com/" page.
Error: "Unable to decode raw data" (NSURLErrorDomain: -1015)
Choose Safari> Report Apple Errors, mark the error number, and describe what you did before you saw this message.
Please tell me where am I wrong?
include_once('config.php'); require 'Slim/Slim.php'; $app = new Slim(); $app->post('/user/create', 'create_user'); $app->get('/user/:id', 'info_user'); $app->post('/user/:id', 'update_user'); $app->delete('/user/:id', 'delete_user'); $app->post('/user/validate', 'validate_user'); $app->get('/user/:id/venues', 'venues_user'); $app->get('/user/:id/queues', 'queues_user'); $app->post('/venue', 'create_venue'); $app->post('/venue/:id', 'update_venue'); $app->delete('/venue/:id', 'delete_venue'); $app->get('/venue/:id', 'info_venue'); $app->get('/venue/:id/queues', 'queues_venue'); $app->post('/queue', 'create_queue'); $app->post('/queue/:id', 'update_queue'); $app->delete('/queue/:id', 'delete_queue'); $app->get('/queue/:id', 'info_queue'); $app->run();
source share