Closed psuplat closed 5 years ago
If you didn’t turn off autorouting then users/create will still match to Users::create without any explicit routes.
$routes->post('/users/create', 'Users::create'); will add a route. Any "get" route that would resolve normally still will, so your "200" is expected. You can ask questions on the slack channel until the forum registration has been restored.
First of all I apologize for throwing a "help me" question here instead of on the forum, but since the registration is temporarily disabled I can't create an account to post.
I trying to understand how the HTTP verbs in routes function.
I have a route defined as such:
$routes->post('/users/create', 'Users::create');
and my controller is as follows:
now, if I try to access the route with GET method I would expect to see some kind of error, probably 405 - Method not allowed. Instead the code executes and I get a 200 response.
Am I missing something obvious here?