[eluser]Unknown[/eluser]
Hi all,
I've been using CI for a while but this is the first time I'm implementing REST.
GET, PUT, etc are all fine and work great. However when I use POST in the same routing settings, i get a 404 error.
I'm using CI version 1.7.
Here's my routing:
$route['service/test/file'] = "some_controller/createFile";
Controller:
class some_controller extends rest_controller {
public function createFile()
{
//--do something here
}
}
Again, using GET or PUT method is fine. I can get it to return whatever I want and all works. But using POST, even with nothing in the createFile function, i get a 404.
Had a snoop around CI code, I notice that the problem is somewhere in the router.php file. It looks like either _set_routing() and/or _parse_routes() is called twice, the first time being the correct route "some_controller/createFile" and the second time is something weird like "in/index.php".
Any ideas?