用REST service上传和下载附件

Quick walkthrough:

1) Create a new Project
2) Create a TestSuite in the Project
3) Create a TestCase in the TestSuite
4) Add an HTTP TestRequest Step to the TestCase
-> Set the endpoint to the URL you want to upload to
-> Set the method to POST (or PUT)
5) In the Request Editor add the File you want to upload to the Attachments tab
6) Set the Media-Type of the POST Body to the same as the Content-Type of the attached File
7) Send the request!

Hope I got that right :-)

Set the attachment and make sure that your Media Type is set to multipart/form-data (I'm assuming you wish to simulate a HTTP form). You also need to change the attachments name to match what the server is expecting it to be. If you have other parameters to send along with the request, you need to check the "Post QueryString" checkbox to send the parameters in the POST body.


https://stackoverflow.com/questions/12467901/soapui-multipart-form-data-rest-request-with-file-attachments
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值