如果请求参数是 application/x-www-from-urlencoded 格式, 如:username=test&password=123456
请求示例
POST http://localhost:8201/api/v4/login/ HTTP/1.1
Host: 49.235.92.12:7005
User-Agent: python-requests/2.22.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 29
Content-Type: application/x-www-form-urlencoded
username=test&password=123456
postman 上新增一个登陆2的接口请求, body可以直接选择:x-www-form-urlencoded
这个时候头部会自动生成一个请求参数Content-Type: application/x-www-form-urlencoded
body部分在表格写key-value格式的参数
如果参数较多,可以点右侧的Bulk Edit按钮快速编辑,格式如下
点 send 按钮发 post 请求,没问题后点 save 按钮保存