Hello,
I having quite a trouble in handling this error:
Fatal error: Uncaught InvalidArgumentException: Unsupported HTTP method "COPY" provided in /home/u866020361/public_html/ruapi/libs/Slim/Slim/Http/Request.php:327
Stack trace:
/home/u866020361/public_html/ruapi/libs/Slim/Slim/Http/Request.php(179): Slim\Http\Request->filterMethod(‘COPY’)
/home/u866020361/public_html/ruapi/libs/Slim/Slim/Http/Request.php(146): Slim\Http\Request->__construct(‘COPY’, Object(Slim\Http\Uri), Object(Slim\Http\Headers), Array, Array, Object(Slim\Http\RequestBody), Array)
/home/u866020361/public_html/ruapi/libs/Slim/Slim/DefaultServicesProvider.php(61): Slim\Http\Request::createFromEnvironment(Object(Slim\Http\Environment))
/home/u866020361/public_html/ruapi/libs/Slim/vendor/pimple/pimple/src/Pimple/Container.php(113): Slim\DefaultServicesProvider->Slim{closure}(Object(Slim\Container))
/home/u866020361/public_html/ruapi/libs/Slim/Slim/Container.php(125): Pimple\Container->offsetGet(‘request’)
/home/u866020361/public_html/ruapi/libs/Slim/Slim/App.php(295): Slim\Container->get('re in
/home/u866020361/public_html/ruapi/libs/Slim/Slim/Http/Request.php on line 327
I have a route and I was testing if the notAllowedHandler works for all kinds of HTTP Methods that are not mapped in my routings and got this Exception instead.
The common ones: GET, POST, PUT, DELETE, OPTIONS works fine with the Handler.
The problem is other types of HTTP Methods like HEAD, COPY, LINK … etc are giving me an Exception instead of being solved by the Handler itself.
if I have only one method to the route, GET user/login and make a request to COPY user/login the application stops and launches an Exception instead of being handled by the Handler.
What should I do to solve this ?
I want that all HTTP methods that are not into my routes goes into the Handler.
Thanks.