I'm trying to create a POST API with Flightphp. I've wrote the following code:
Flight::route('GET /addProduct', function(){
echo "GET REQUEST";
});
Flight::route('POST /addProduct', function(){
echo "POST REQUEST";
var_dump($_POST);
});
If I perform with Postman a POST request, the output is "GET REQUEST" (and no $_POST variable is printed).
How can I receive a POST request? Why I send a code and the server receives another one?