jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: File upload results in 404 error
Date Sat, 24 Sep 2016 02:21:27 GMT
run curl with -v and compare (visually , not sure if the Authorization
header is case senstive)

On Tue, Sep 20, 2016 at 1:51 AM, Tarun Kumar Bhadauria <
tarun.kumar.bhadauria@raisin.com> wrote:

> 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