我想用 Vegeta 请求 POST 一个图像文件作为 multipart/form-data
但是当我使用这段代码时,它并没有很好地工作。正如我所想,由于图像大小,Vegeta 报告中的“平均字节数”需要超过 20000,但它只有 55.00
我这样命令是因为它在 Windows Power Shell 上
PS >vegeta attack -duration=10s -rate 100 -targets .\targets_formdata.txt -output output\results.bin
目标表格数据.txt
POST http://url/to/request
Content-Type: multipart/form-data; boundary=Boundary+1234
@body.txt
正文.txt
--Boundary+1234
Content-Disposition: form-data; name="file"; filename="DvBp50cVYAEIfxd.jpg"
Content-Type: image/jpeg
我写--Boundary+1234
的是真的,因为--Boundary+1234
,这可能是一个问题?我不知道真正的问题是什么。