Bash: curl 命令学习 - cheatsheet

常见的 curl 场景记录
更新于: 2025-10-06 20:58:17

cheatsheet

功能代码
GET
curl -X GET "https://httpbin.org/get" -H "accept: application/json"
POST 带文件
# 这种 form,会自动添加 method 为 post
curl --location 'http://bag-nova-galaxy.beta.saybot.net/2/assess' \
  --form "text=If you're happy and you know it, clap your hands." \
  --form file=@$HOME/Downloads/01-if.mp3
下载文件
curl -O https://neat.joeldare.com/neat.css
curl -O https://neat.joeldare.com/neat.html
安装脚本
curl -L https://meshery.io/install | bash -