get与post
get | post | |
get从服务器获取数据, 一般用于搜索排序和筛选之类的操作 | post向服务器发送数据,用于修改和写入数据 | |
缓存 | 能被缓存 | 不能被缓存 |
安全 | 数据能被保存在浏览器历史,安全性较差,因为所发送的数据是 URL 的一部分。 | 发送数据不能被保存,比较安全 |
编码类型 | application/x-www-form-urlencoded | application/x-www-form-urlencoded or multipart/form-data。为二进制数据使用多重编码。 |
get只能发送ASCII字符 | 更多数据类型 | |