2017-02-17 48 views
0

我是locust的新手,我知道它對json格式的http請求有很好的支持。如何以protobuf格式發送http請求蝗蟲

我們希望與pb格式執行上http api壓力測試,但是,如何在protobuf格式由locust發送http請求(而不是,jmeter支持pb格式)。

這和上傳文件一樣嗎?

files = { 
'image': open('sample.jpg', 'rb'), 
} 

r = requests.post('http://localhost:5000/', files=files) 

回答