想發一個post包,使用Fillder模擬發送POST請求比較方便:
發送報文的Header:
Content-Type: application/json Connection: Keep-Alive Accept: application/json
Host: 192.168.1.252:8080
Content-Length: 101
Host和Content-Length是在執行Excute后自動生成的,請求的參數為json,具體是:
{"userName":"tom","realName":"tomson","passWord":"1234","salary":100,"birthday":null,"userId":"1000"}
截圖如下:
發送請求完,抓到了剛才模擬發出的POST請求,如下: