difference between http get and post

Posted phoenix tree

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了difference between http get and post相关的知识,希望对你有一定的参考价值。

1 用get的地方

在浏览器中输入url直接访问资源时,用get。get是通过url传参的。

2 用post的地方

2.1 url长度超限时

post是将参数放在http body中的,因此对参数的长度是没有要求的,但是一般的服务器对url的长度都是有要求的,apache http服务器要求url长度不超过4000个字符。

如果参数长度超了,那么就必须要用post。

2.2 对加密要求很高时

get方式传参数会泄漏重要信息。

以上是关于difference between http get and post的主要内容,如果未能解决你的问题,请参考以下文章

What's the difference between all the Selection Segues?

Difference between VMFS 5 & VMFS 6

*187. Repeated DNA Sequences (hashmap, one for loop)(difference between subsequence & substring)

Difference between Char.IsDigit() and Char.IsNumber() in C#

Only Link: What's the difference between dynamic dispatch and dynamic binding

What's the difference between using “let” and “var” to declare a variable in JavaScript?