curl 请求生成器
选择请求方法、填写地址、请求头与请求体,生成 curl 命令;JSON 请求会自动补上 Content-Type,表单字段会做 URL 编码。
请求头(每行一个「名称: 值」,可留空)JSON 请求会自动补 Content-Type,除非你已经写了
请求体
请求体内容
curl -X POST -H 'Content-Type: application/json' -d '{"name": "demo", "role": "viewer"}' https://api.example.com/users命令里的每一段按颜色区分:蓝色是命令本身,紫色是选项,绿色是取值,橙色是目标文件或路径。
curl发送 HTTP 请求-X POST请求方法 POST-H 'Content-Type: application/json'请求头 Content-Type-d '{"name": "demo", "role": "viewer"}'JSON 请求体https://api.example.com/users请求地址