想发一个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请求,如下: