是我要下载别人的文件,不是我要提供下载接口。现在我要访问外部的服务器从他那里下载文件然后保存,但是这个该怎么访问呢?
收起
参考:
Java通过http方式下载文件_爱窦的博客-CSDN博客_java 下载http文件 @GetMapping("getFile/v1.1")public void getFileV2(HttpServletResponse response) throws Exception {//设置请求头,表示下载文件和文件名称response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("xx.jpg", "utf-8"));String urlStr = "https:/. https://blog.csdn.net/weixin_44342481/article/details/120020361
报告相同问题?