-----------------------post请求示例----------------
#请求行
POST https://re.csdn.net/csdnbi HTTP/1.1
#请求头部开始
Host: re.csdn.net #服务器主机地址
Connection: keep-alive #持续连接
Content-Length: 482 #HTTP消息实体的传输长度
Accept: */* #客户端支持数据类型
Origin: https://blog.csdn.net #主页地址(不包含页面的path,只包含协议和域名)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 #客户端类型及版本
Content-Type: text/plain;charset=UTF-8 #body数据类型
Referer: https://blog.csdn.net/malz_zh/article/details/83061529 #完整主页地址,表明请求是从哪个主页发送的请求(包含path)
Accept-Encoding: gzip, deflate, br #客户端支持(接受)的编码类型,Accept为接受支持
Accept-Language: zh-CN,zh;q=0.9 #客户端支持的语言
Cookie: uuid_tt_dd=10_30711819110-1547456902841-223804; dc_session_id=10_1547456902841.460658; Hm_ct_6bcd52f51e9b3dce32bec4a3997715ac=6525*1*10_30711819110-1547456902841-223804; dc_tos=pqxhx0; Hm_lvt_6bcd52f51e9b3dce32bec4a3997715ac=1555822559,1556851220,1556852229,1556887285; Hm_lpvt_6bcd52f51e9b3dce32bec4a3997715ac=1556887285; c-login-auto=13
#请求头部结束
#body
[{"headers":{"component":"enterprise","datatype":"re","version":"v1"},"body":"{"re":"uid=-&ref=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3D8YQXelBUIXh6CcK1koFk-QE6RpCHXmc6h1RVAExUs8LTxXacR_Db4u3MLTYmMand6drFLjY6NCFCtg_uOb2Moa%26wd%3D%26eqid%3Df7697d2a000c1737000000065ccc3704&pid=blog&mod=popu_4&dsm=get&mtp=2&con=&ck=-&curl=https%3A%2F%2Fblog.csdn.net%2Fmalz_zh%2Farticle%2Fdetails%2F83061529&session_id=10_1547456902841.460658&x-acl-token=status_js_dkuyqthzbajmncbsb_token"}"}]
------------------------------示例结束--------------------------------------------------
一、post方法body常见四种数据格式:
1、application/x-www-form-urlencoded(post默认的数据格式,与get方法一样,在fiddler中Inspectors-->Webfprms中显示)
2、application/json(text/plain)
3、text/xml
4、multipart/form-data(表单)