httperf测试json rest api
我有一个包含以下内容的文件:httperf测试json rest api,json,rest,httperf,Json,Rest,Httperf,我有一个包含以下内容的文件: helper?token=99999 method=POST contents='{"key1":99999, "key2":88888, "key3":55}' 然后我运行这个命令: httperf --print-reply --print-request --hog --client=0/1 --server=a_server --port=8080 --uri=/ --rate=25 --send-buffer=4096 --recv-buffer=163
helper?token=99999 method=POST contents='{"key1":99999, "key2":88888, "key3":55}'
然后我运行这个命令:
httperf --print-reply --print-request --hog --client=0/1 --server=a_server --port=8080 --uri=/ --rate=25 --send-buffer=4096 --recv-buffer=16384 --add-header='Content-Type:application/json' --method=POST --wsesslog=1,1.000,entrada_carga
但是服务器没有得到任何json。我已经尝试过不同的逃跑方法,但没有成功
同一根带有curl的柱子,效果非常好
您是否有使用httperf发布json的指针
提前感谢您必须在标题末尾添加一个明确的carriege return,如下所示:
--add header='Content-Type:application/json\n'使用以下命令将URL拆分为服务器和URI:
httperf--print reply--print request--server“hostname.com”--uri=“url的其余部分”带有头、post和ssl的示例
httperf --server yourhost.com.com --uri /smartlog --num-conns=500 --rate=500 --ssl --method POST --wsesslog=100000,0,httprefpost_data.txt --add-header "sdk:3.0\nconfig:3.0\nzid:0\n"
创建包含以下内容的文件(httprefpost_data.txt):
/smartlog method=POST contents='data=testing&uid=13'