Forum Discussion

andretost's avatar
12 years ago

Send a file as content in a REST POST/PUT call

I want to do the equivalent of what in curl would look like this: curl -X PUT -H "Content-Type: application/octet-stream" http://whatever.org --data_binary @myfile.zip

But I cannot seem to figure out how to make this work in soapUI. The way to do this (i.e. upload a file) appears to be to create an attachment and then refer to that attachment from within the regular request body, which makes the content type of the overall message a multipart form. But that's not what I want, I just want the content of my file copied straight into the request message and set the content type accordingly. Do I have to open my binary file in some editor and copy/paste the content into the request window. Why can't I just do what in curl is done by using @[file name]?
No RepliesBe the first to reply