jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarun Kumar Bhadauria <tarun.kumar.bhadau...@raisin.com>
Subject File upload results in 404 error
Date Tue, 20 Sep 2016 08:51:04 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message