问题
How to download File
with open-feign, it's possible?
for example:
@RequestLine("GET /file")
File from (@Param("param") String param);
回答1:
Are you using Spring?
You can use this code:
@RequestMapping(
value = "/multipart/download/{fileId}",
method = GET)
MultipartFile[] download(@PathVariable("fileId") String fileId);
Check the tutorial in the official Github.
来源:https://stackoverflow.com/questions/52744112/how-to-download-file-with-open-feign