get post

在浏览器地址栏中输入某个URL地址或单击网页上的一个超链接时,一定是GET请求。

如果网页中<form>表单元素的method属性被设置GET,也是get请求。

使用GET请求方式给WEB服务器传递参数的格式:  http.............jsp?name=xxx&password=xxx。

使用GET方式传送到数据量有限


POST请求方式主要用于向WEB服务器端程序提交FORM表单中的数据:将method置为post

POST方式将各个表单字段元素及其数据作为HTTP消息的实体内容发送给WEB服务器,传送的数据量理论上是无限的

POST /conter.jsp HTTP/1.1

referer:http/localhost:8080/Register.html

content-type:appliaction/x-www-form-urlencoded

host:localhost:8080

content-length:43

name = zhangsan&password=123                      --请求体中传递参数:

猜你喜欢

转载自blog.csdn.net/rhhboring/article/details/80184665