所以,我在MacOS Sierra上使用庞巴迪用于从命令行进行服务器基准测试。在本例中,我使用了1个连接和1个请求,以及两个标头:"授权"one_answers"内容类型"以及正文:"{isTemplate:1}"但服务器不接收正文。
./bombardier -c 1 -n 1 -m PATCH -H "Authorization: Bearer MYBEARERGOESHERE" -H "Content-Type: application/x-www-form-urlencoded" -b "{isTemplate:1}" http://localhost:8082/presentation/6525/update
我试过了:
-b "{isTemplate:1}"
-b "isTemplate:1"
有什么想法吗?
刚刚找到解决方案,您需要编写如下的主体变量:
-b "isTemplate=1"
所以最后的请求:
./bombardier -c 1 -n 1 -m PATCH -H "Authorization: Bearer MYBEARERGOESHERE" -H "Content-Type: application/x-www-form-urlencoded" -b "isTemplate=1" http://localhost:8082/presentation/6525/update