HTTP表单怎么理解

来源:互联网 发布:sql删除数据库命令 编辑:程序博客网 时间:2024/06/08 16:46


HTTP表单本质上是一种HTTP的Content-Type,application/x-www-form-urlencoded,数据本质上是通过HTTP body传输


例子,有HTML页面如下



点击按钮提交,通过抓包工具,抓到数据如下

POST http://bssmanage.test.net/query/file HTTP/1.1Host: bssmanage.test.netConnection: keep-aliveContent-Length: 30Content-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36bucket=a&filename=1&filetype=1

总结:表单是一种特定格式的数据,在HTTP body中传输,与Json类似


原文出自:http://blog.csdn.net/daiyudong2020/article/details/78447013


End;