我有这样的卷曲命令:
curl -X POST -T "{sample_data.csv}" -H "Content-Type: text/csv" https://api.mysite.com/v1/jobs/upload.json?key={api_key}
问题是我不明白JMeter中的哪个组件应该通过"{sample_data.csv}"
文件上传到端点。
现在我有这样的配置:
当我进行测试时它会告诉我:
"error":{"message":"Un-Acceptable format, Content-Type must be one of those listed in \"formats\" but you sent \"multipart/form-data; boundary=E-VEr1-ZesF7xja5HezBWptB6xP_gsGODn\"","formats":["text/csv","text/plain","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/json","application/xml","application/vnd.oasis.opendocument.spreadsheet"]}}
答案 0 :(得分:2)
https
答案 1 :(得分:0)
要使用JMeter模拟此卷曲调用,您需要:
HTTP Request Sampler配置如下:
HTTP Authorization Manager作为HTTP请求的子代(如果您只想为此HTTP请求使用用户名/密码),或者如果您打算将其用于范围内的所有请求,则为同一级别。
根据此示例调整您自己的参数。