Hello, first thanks for this great extension,
I'm trying it and it works perfect when I do for the root page (mydomain.com) but when I want to do for example login URI, I always have 404 not found.
Here what I do :
`require "./vendor/autoload.php";
// Require the main WaterPipe class
use ElementaryFramework\WaterPipe\HTTP\Request\Request;
// Require the Request class
use ElementaryFramework\WaterPipe\HTTP\Response\Response;
// Require the Response class
use ElementaryFramework\WaterPipe\WaterPipe;
// Create the base pipe
$basePipe = new WaterPipe;
$basePipe->request("/", function (Request $req, Response $res) {
$res->sendText("Welcome to my dark world"); work perfectly
});
$basePipe->post("/game", function (Request $req, Response $res) {
$res->sendText("Welcome to my dark world 2"); //didn't work
});
// $basePipe->get("/api/exchange_rate", function (Request $req, Response $res) {
// $controller = new Rate_Controller();
// $controller->exchange_rate($req, $res);
// });
// Run the pipe and serve the API
$basePipe->run();
`
When I call mydomain.com/game, I always had 404 not found. And now I think it is normal cause I dont have file named game and I didn't touch .htaccess.
Or I'm in wrong way.
Hope you can help me, thanks
Hello, first thanks for this great extension,
I'm trying it and it works perfect when I do for the root page (mydomain.com) but when I want to do for example login URI, I always have 404 not found.
Here what I do :
`require "./vendor/autoload.php";
// Require the main WaterPipe class
use ElementaryFramework\WaterPipe\HTTP\Request\Request;
// Require the Request class
use ElementaryFramework\WaterPipe\HTTP\Response\Response;
// Require the Response class
use ElementaryFramework\WaterPipe\WaterPipe;
// Create the base pipe
$basePipe = new WaterPipe;
$basePipe->request("/", function (Request $req, Response $res) {
$res->sendText("Welcome to my dark world"); work perfectly
});
$basePipe->post("/game", function (Request $req, Response $res) {
$res->sendText("Welcome to my dark world 2"); //didn't work
});
// $basePipe->get("/api/exchange_rate", function (Request $req, Response $res) {
// $controller = new Rate_Controller();
// $controller->exchange_rate($req, $res);
// });
// Run the pipe and serve the API
$basePipe->run();
`
When I call mydomain.com/game, I always had 404 not found. And now I think it is normal cause I dont have file named game and I didn't touch .htaccess.
Or I'm in wrong way.
Hope you can help me, thanks