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的更多相关文章

  1. Java 堆内存与栈内存异同(Java Heap Memory vs Stack Memory Difference)

    --reference Java Heap Memory vs Stack Memory Difference 在数据结构中,堆和栈可以说是两种最基础的数据结构,而Java中的栈内存空间和堆内存空间有 ...

  2. What's the difference between a stub and mock?

    I believe the biggest distinction is that a stub you have already written with predetermined behavio ...

  3. [转载]Difference between <context:annotation-config> vs <context:component-scan>

    在国外看到详细的说明一篇,非常浅显透彻.转给国内的筒子们:-) 原文标题: Spring中的<context:annotation-config>与<context:componen ...

  4. What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?

    ref:http://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em The ...

  5. difference between forward and sendredirect

    Difference between SendRedirect and forward is one of classical interview questions asked during jav ...

  6. Add Digits, Maximum Depth of BinaryTree, Search for a Range, Single Number,Find the Difference

    最近做的题记录下. 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the ...

  7. MySQL: @variable vs. variable. Whats the difference?

    MySQL: @variable vs. variable. Whats the difference?   up vote351down votefavorite 121 In another qu ...

  8. Distribute numbers to two “containers” and minimize their difference of sum

    it can be solved by Dynamical Programming.Here are some useful link: Tutorial and Code: http://www.c ...

  9. difference between append and appendTo

    if you need append some string to element and need set some attribute on these string at the same ti ...

  10. js-FCC算法-Symmetric Difference

    创建一个函数,接受两个或多个数组,返回所给数组的 对等差分(symmetric difference) (△ or ⊕)数组. 给出两个集合 (如集合 A = {1, 2, 3} 和集合 B = {2 ...

随机推荐

  1. jsp文件放在WebRoot下还是WebInfo下

    观点一:(较为赞同) 安全性不是真正的原因,因为jsp是要解析后才显示到浏览器的,即使用户知道你jsp的路径,也不可能通过浏览器看到jsp源码的,而如果是通过其它手段入侵服务器的话,放在WEB-INF ...

  2. ZSTU 4241 圣杯战争(ST表+二分)

    题目链接  ZSTU 4241 问题转化为有很多区间,现在每次给定一个区间求这个区间和之前所有区间中的某一个的交集的最大长度. 强制在线. 首先我们把所有的区间预处理出来. 然后去重(那些被包含的小区 ...

  3. CDOJ 1171 两句话题意

    题目链接:http://acm.uestc.edu.cn/#/problem/show/1171 题解: 这道题应该从gcd出来的值入手. 我们要求所有子集的gcd的和 首先我们先统计一下每个数字出现 ...

  4. SSL/TLS协议

    今天闲着给自己的网站申请了一个免费证书,顺便复习下SSL/TLS协议    (https 就是在http+ssl协议) SSL介绍: 安全套接字(Secure Socket Layer,SSL)协议是 ...

  5. abp ueditor 多图以及文件无法上传

    abp .net core使用ueditor遇到的问题:多图和上传文件无法上传,提示“http://请求错误”. 400 bad request解决办法: 因为abp默认启用了ValidateAnti ...

  6. Unity Step by Step(一)

    要打败敌人,首先要了解敌人,这不是我说的,这是孙子说的.^_^ 首先,我一头雾水,所以我就下了个demo,demo会在下面附上,声明,这不是我写的,我也是下载别人的,地址:http://game.ce ...

  7. Unity -- 入门教程一

    首先声明一下,我用的Unity版本是4.6.6,编译环境是VS2010,其余的我会慢慢介绍,安装的过程这里我就不做讲解了,度娘那会做的比我详细.安装包可以在最下面的联系方式找我要,现在开始进入主题.  ...

  8. Go -- socket read的内容以16进制输出

    buf := make([]) reqLen, err := conn.Read(buf) // 遍历, 转为16进制 buffer := new(bytes.Buffer) for _, b := ...

  9. iOS -- 十进制、十六进制字符串,byte,data等之间的转换

    十进制->十六进制 Byte bytes[]={0xA6,0x27,0x0A}; NSString *strIdL = [NSStringstringWithFormat:]]]; 十六进制-& ...

  10. h5调用手机照相机

    camera.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> & ...