用REST service上传和下载附件
程序员文章站
2022-07-14 12:45:50
...
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://*.com/questions/12467901/soapui-multipart-form-data-rest-request-with-file-attachments
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://*.com/questions/12467901/soapui-multipart-form-data-rest-request-with-file-attachments
上一篇: Maven FAQ
下一篇: SCJP 认证考试指南
推荐阅读
-
在windows和linux之间用SecureCRT来上传和下载文件
-
linux系统怎么用SecureCRT上传和下载文件?
-
C#实现附件上传和下载功能
-
用canvas画飞机大战(一步步详解附带源代码,源码和素材上传到csdn,可以免费下载)
-
用REST service上传和下载附件
-
用REST service上传和下载附件
-
用FileZilla服务器端和客户端实现本机与虚拟机之间文件上传和下载
-
每天一个linux命令(26):用SecureCRT来上传和下载 linuxDOSDebianwindowsssh
-
linux系统怎么用SecureCRT上传和下载文件?
-
Windows下怎么用XShell/SecureCRT从Linux系统上传和下载文件?