跳至主要內容
kitlocal.dev

curl 指令速查表

本機執行

100% 在你的瀏覽器中處理。輸入與輸出絕不會離開你的裝置。

用於 API 偵錯與自動化的 HTTP 用戶端指令:請求方法、JSON 酬載、標頭、驗證、multipart 上傳、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

請將尖括號內的任何內容替換為你自己的數值。指令均源自官方文件,且範例均在所示版本上實際執行。