Timeline for What features would you like to have in PHP?
Current License: CC BY-SA 2.5
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 19, 2010 at 1:28 | history | made wiki | Post Made Community Wiki | ||
| Dec 18, 2010 at 16:14 | comment | added | davidtbernal | To further elaborate, HttpPost means the method is only available for a post request. Even if someone makes a get request with matching arguments, they would receive a 404. If someone makes a post request with no arguments (referring to my example), they would also receive a 404. This functionality is implemented at the web framework level, not the language level. The only role the language has in this is supporting attributes. | |
| Dec 18, 2010 at 15:50 | comment | added | davidtbernal | Actually, that code would not be valid in C#. Instead, you'd have something like [HttpGet] public void login() and then [HttpPost] public void login(string name, string password). The attributes don't change the fundamental rules of the language. | |
| Dec 17, 2010 at 22:47 | history | edited | Josh K | CC BY-SA 2.5 | deleted 2 characters in body |
| Dec 17, 2010 at 21:56 | comment | added | Justin Ethier | You could always just call them login_get and login_post. A framework can then key off of those names instead of the proposed attribute. | |
| Dec 17, 2010 at 21:46 | comment | added | StasM | if you do $foo->login(), how do you know which one of those gets called? | |
| Dec 17, 2010 at 21:42 | history | answered | TaylorOtwell | CC BY-SA 2.5 |