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
http method name in uppercase is too ugly.. #9
Comments
Agree with it. |
It's also consistent with the routing framework used (julienschmidt/httprouter). |
It's actually the way HTTP methods should be see Now, with the Initialisms rule from naoina's link, I recommend they stay. |
I also think that using capitalized GET and POST is a good way to understand that methods create a GET and POST route respectively, we are not getting a value or posting whatever. In fact |
+1 |
Capitalized is more readable. |
+1 for |
This was exactly my intention and the reason why it is used this way in the HttpRouter package. |
EITHER will be fine to me. |
I think that lowercase is better - all your routes will generally be defined together so it's obvious that it's not a "get something" method call. I think the only way to decide what option to use is to decide if you want to completely follow the "official" code style, which IMO is a good decision because following that guide means that this issue would never have come up in the first place :) that's just what I think anyway. |
As noted above, this is not against the code guidelines. |
@julienschmidt ah you're right, apologies - in that case I say leave it as is because they do follow the guidelines. |
I understand that Get, Post, Put may look better for some people, but since it's already capitalized I do not think it's a good idea to change it. The document referred by @naoina is also a good source to leave it as is. And, if we change POST() to Post(), should we also rename context.JSON() to context.Json()? |
Definitely if you do so. |
Just a simple silly comment, does this solve your problem? 😄
Not only it's a Again I recommend keeping them in caps as they are inline with their HTTP meaning. |
hahaha brilliant fix |
Well done! |
So, hoping to use the first letter capitalized in such a way ..
Get Post Put etc.
The text was updated successfully, but these errors were encountered: