I tried almost everything but I keep receiving
Method not allowed
Method not allowed. Must be one of: POST
The code that I'm using is:
$app->post('/ticket/new', function (Request $request, Response $response) {
// Create new book
echo 'a;';
});
I'm trying on postman
method: post
url: /public/ticket/new
header: Content-Type application/javascript
Any clue will help me
.htaccess
is ok:
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Thanks a lot