formUpload is just a utility that wraps a RawFileBodyPart + asMultipartForm
so this will work, I guess
.bodyPart(RawFileBodyPart("file", data.xls").contentType("application/vnd.ms-excel").fileName("data.xls")) .asMultipartForm thanks that should go on the documentation
But how to upload the file for put operation…This is not working for put…What may be the solution in gatling 2.0
Send your code that is not working.
Thanks john,Here I am giving my code…
.formParam(“title”, “Post with gatling”)
.formParam(“content”, “Content of pos”)
And previously I got advice thta formParam will work for gatling 2.1…But I don’t know how to do that…presently I am using gatling 2.0…So If that is the only solution please tell me the
Step by Step procedure to migrate…Actually In my case formParam and formUpload is not at all working…Please help me with detail solution…As per my api I need only formParam…
So, what you are going to have to do is choose one of these two options:
- Upgrade to Gatling 2.1
- Figure out how to build the body of the PUT request manually
If you can’t make option 1 work, then start here for option 2: http://www.w3.org/TR/html401/interact/forms.html#h-22.214.171.124
John…I know about forms…But what is the syntax to provide form to gatling???
Look at the format that it gets sent to the server in. Any reason why you can’t give it to Gatling exactly like that?