-
Notifications
You must be signed in to change notification settings - Fork 430
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
关于RESTFUL API的数据传递 #10
Comments
@scottjeremy 现在 go-gin-example 这个项目源码中,之前我已经把敏感信息的入参方式都改为走 Body 入参了。先前在文章中大量用 Query 仅仅是为了便于展示。仅此而已 |
@scottjeremy 另外你不经意提到的更优雅的处理方式。我本次将进行修改,以此达到更好的代码结构 |
eddycjy
added a commit
to eddycjy/go-gin-example
that referenced
this issue
Nov 25, 2018
已另行优化,感谢 |
Wonderex95
added a commit
to Wonderex95/go-gin-mongodb
that referenced
this issue
Jan 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
增加和修改的数据都是通过params来传 这很不利于安全,而且URL长度每个游览器都有所限制。
标签里的标题、状态、创建者都应该放在POST或PUT的body下(其余API同理)
在models下你已经定义了tag的结构体,所以可以直接引用结构体里面的数据类型
下面是我修改过后的AddTags方法:
The text was updated successfully, but these errors were encountered: