Bootstrap

【curl】接口调用返回的流直接写入文件

需求描述

实现方法

curl --location --request POST 'https://127.0.0.1:9090/file-system/downloadFileResponseEntity' \
--header 'secretkey: 123456==' \
--header 'x-forwarded-for: 192.168.8.72' \
--header 'Content-Type: application/json' \
--data '{
    "fileCode": "1707006904085.pdf",
    "fileType": "pdf"
}' > test4085.pdf

参考文章

;