Rejiggered the controller (now called endpoint.php) so that it supports emulated HTTP methods as well.