Jsoup传递MultipartFile类型参数的方法
String url = "接口地址";
Connection connection = Jsoup.connect(url).ignoreContentType(true);
//设置请求头
connection.header("Content-Type", "multipart/form-data");
//传文件参数
File file = new File("D:/测试文件.txt");
InputStream inputStream = new FileInputStream(file);.
原创
2021-08-13 18:06:08 ·
1098 阅读 ·
0 评论