我有這樣的curl命令:如何在JMeter中使用curl請求?
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"]}}
謝謝,但它不能解決我的問題 - 傳遞文件像捲曲-T FILE – user2176575