跳转到主要内容
kitlocal.dev

curl 命令速查表

本地运行

100% 在你的浏览器中处理。输入和输出绝不会离开你的设备。

用于 API 调试与自动化的 HTTP 客户端命令:请求方法、JSON 载荷、请求头、认证、多部分上传、Cookie、重试与 curl 8.x 上的 TLS 诊断。

工作原理

curl transfers URL data from the shell: set method (-X), headers (-H), body (-d/-F), and output (-v/-i/-w) explicitly, because curl prints only the response body by default.

生存指南

最先需要掌握的少数几个命令。

42 条命令

键盘快捷键/聚焦搜索框JK移动选择C复制选中命令F收藏选中项Esc清空搜索

Requests & Methods

Send GET, HEAD, POST, PUT, PATCH, and DELETE requests with clean headers.

  • 基础必备

    Fetch a URL and print the response body to stdout

    curl <url>

    构建命令

    curl <url>

    输入的值将按原样插入。若包含空格或特殊字符,请自行添加引号。

    适用场景

    Baseline check for reachability, response payload, and pipe integration with jq.

    示例

    curl https://api.example.com/health

    运行结果

    {"status":"ok","version":"2.4.0"}

Payloads, Forms & Files

Send JSON, URL-encoded forms, multipart uploads, and binary bodies.

Auth, Cookies & TLS

Authenticate requests, manage cookies, resolve hosts, and verify certificates.

Headers, Timing & Debugging

Inspect TLS handshakes, response headers, status codes, and per-phase latency.

Downloads, Retries & Limits

Write files safely, resume interrupted downloads, cap wait time, and retry.

在 KitLocal 工具中试用

核对时间:2026年11月15日 · 核对版本:curl 8.x

来源: curl manpage · Everything curl

请将尖括号内的内容替换为你自己的实际值。所有命令均来自官方文档,示例均在标明版本上实测运行。