curl 使用 post 請求,傳遞 json 參數,下載文件

curl -X POST http://ip:8888/nacos/v1/cs/file/download -H "Accept: application/octet-stream" -H "Content-type: application/json" -o file.zip -d'
{
    "namespaceId": "9f069446-e378-49af-9f69-e4e399e9becf",
    "files": []
}
' 

-X 指定請求類型json

-H 指定請求頭app

-o 指定保存文件名curl

-d 指定 json 參數url

 

get 請求發送參數spa

用 \& 轉義code

curl http://ip:8888/nacos/v1/cs/file/downloadNamespace?namespaceId=9f069446-e378-49af-9f69-e4e399e9becf\&group=yj

 或者使用引號blog

curl 'http://ip:8888/nacos/v1/cs/file/downloadNamespace?namespaceId=9f069446-e378-49af-9f69-e4e399e9becf&group=yj'
相關文章
相關標籤/搜索