Skip to content
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

get和post的区别? #25

Open
DamomHd opened this issue Mar 1, 2021 · 0 comments
Open

get和post的区别? #25

DamomHd opened this issue Mar 1, 2021 · 0 comments
Labels

Comments

@DamomHd
Copy link
Owner

DamomHd commented Mar 1, 2021

  • GET在浏览器回退是无害的,不会重新请求,POST会再次提交请求
  • GET产生的URL地址是可以被收藏的,POST不可以
  • GET请求会被浏览器主动缓存,POST不会,除非手动设置
  • GET请求只能进行URL编码,而POST支持多种编码方式
  • GET请求参数会被完整保留在浏览器历史记录里,而POST中的参数不会被保留
  • GET请求在URL中传送的参数是有长度限制的,而POST没有
  • 对参数的数据类型,GET只接受ASCII字符,而POST没有
  • GET比POST更不安全,因为参数全部暴露在URL上,所以不能用来传递敏感信息
  • GET参数通过URL传递,而POST放在request body中
@DamomHd DamomHd added the HTTP label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant