Hello All,

I am trying to convert following curl request to JMeter call -

curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept:
application/json' --header 'Authorization: Bearer <xxx>' -F
upload_file=@"test.pdf" 'https://xxx'

And this is how JMeter request looks as -

http://i.stack.imgur.com/c9X1U.png

And this is what I get from Request tab of View Results in Tree -

*POST https://xxx <https://xxx>*
*POST data:*
*--ZRdmcvkfYjxrM3FEDal6NGOFIdjm1F0*
*Content-Disposition: form-data; name="upload_file"; filename="test.pdf"*
*Content-Type: multipart/form-data*

*<actual file content, not shown here>*
*--ZRdmcvkfYjxrM3FEDal6NGOFIdjm1F0--*


*[no cookies]*

*Request Headers:*
*Connection: keep-alive*
*Content-Type: multipart/form-data*
*Accept-Language: en-US*
*Authorization: bearer <xxx>*
*Accept: application/json*
*Content-Length: 79104*
*Host: <host>*
*User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)*


But the I get 400 status code as result of call. Given that curl work, what
do I do wrong with JMeter request?

Thanks
Tarun K

Reply via email to