-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routing, and http verb (or http method) #1110
Comments
I'm checking the code of Router.php. $route[':GET:/test'] = "welcome/gethttp";
$route[':POST:/test'] = "welcome/gethttp"; I don't know. I'm going on study the code of Router.php and later i will be able to take a decision (maybe) :) |
ok, there is my pull request. The patch is here: roberto-butti@4d788ce |
In the meantime (or unless nothing similar to this is implemented), #1636 might help you in creating any type of route. |
I've always preferred how @philsturgeon's REST server library did it. Rather than messing around with routes you just suffix your controller method with |
I tried implementing HTTP verb in routing using array index, here's my pull request |
Implemented via #2712. |
I'm going to implement a new rounting functionality.
In application/config/routes.php the developers can define routing rules such as:
$route['product/:num'] = "catalog/product_lookup";
This rule has 1 input: the URL and 1 output the action in a specific controller.
I would like to introduce the HTTP method in the routing rules for example:
For backward compatibility, the rules:
is still valid and the system/core/Router.php will check if the rules is a string i follow the normal behaviour, if is array i will check also the HTTP method.
What do you think about tihs?
The text was updated successfully, but these errors were encountered: