Arnarsson

Curl Http

開發程式設計v1.0.0
作者:Arnarsson更新於 2026-05-11curl-http@clawhub_arnarsson/curl-http
測試生成指令碼工具

據 AlphaMoat 統計,截至 2026-10,Curl Http 累計下載 9,205 次、獲 6 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 2,999 位,在「開發程式設計」分類(1,069 個)中排名第 235 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
9205
星標
6
全站下載量排名
#2,999
全站前 28% · 「開發程式設計」前 22%
平台累計下載星標評論
ClawHub ↗69756-
SkillHub ↗92056—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

圍繞 HTTP 請求、介面除錯與檔案傳輸給出常用引數寫法,例如用 -X 指定方法、用 -d 傳資料、用 -O 按遠端檔名儲存。複雜且要複用的請求可以寫進 --config 檔案,避免每次重敲。 此流程可能影響外部帳號、公開內容或實際狀態;核對目標和具體操作,重要變更或發布前取得使用者確認。

資料釋出於 2026-10-27

可以用來做什麼

  • 手寫一次帶方法體的介面呼叫
  • 把反覆用的請求固化成配置檔案

什麼時候用

  • 臨時調介面不想裝客戶端時
  • 記不清某個引數該配什麼時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

給我一條帶認證頭的 POST 請求示例
這個請求怎麼用配置檔案複用

月度資料趨勢

累計下載9205
5035727595142026-03 · 累計下載 53442026-05 · 累計下載 61982026-06 · 累計下載 64352026-07 · 累計下載 66522026-08 · 累計下載 67612026-09 · 累計下載 72532026-10 · 累計下載 920526-0326-0926-10
星標6
5662026-03 · 星標 52026-05 · 星標 62026-06 · 星標 62026-07 · 星標 62026-08 · 星標 62026-09 · 星標 62026-10 · 星標 626-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-109205—6
2026-097253—6
2026-086761+1.6%6
2026-076652+3.4%6
2026-066435+3.8%6
2026-056198—6
2026-035344—5

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

7.2 KB · ClawHub v1.0.0
---
name: curl-http
description: Essential curl commands for HTTP requests, API testing, and file transfers.
homepage: https://curl.se/
metadata: {"clawdbot":{"emoji":"🌐","requires":{"bins":["curl"]}}}
---

# curl - HTTP Client

Command-line tool for making HTTP requests and transferring data.
展開全部(共 331 行)

## Basic Requests

### GET requests
```bash
# Simple GET request
curl https://api.example.com

# Save output to file
curl https://example.com -o output.html
curl https://example.com/file.zip -O  # Use remote filename

# Follow redirects
curl -L https://example.com

# Show response headers
curl -i https://example.com

# Show only headers
curl -I https://example.com

# Verbose output (debugging)
curl -v https://example.com
```

### POST requests
```bash
# POST with data
curl -X POST https://api.example.com/users \
  -d "name=John&[email protected]"

# POST JSON data
curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -d '{"name":"John","email":"[email protected]"}'

# POST from file
curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -d @data.json

# Form upload
curl -X POST https://api.example.com/upload \
  -F "[email protected]" \
  -F "description=My document"
```

### Other HTTP methods
```bash
# PUT request
curl -X PUT https://api.example.com/users/1 \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane"}'

# DELETE request
curl -X DELETE https://api.example.com/users/1

# PATCH request
curl -X PATCH https://api.example.com/users/1 \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]"}'
```

## Headers & Authentication

### Custom headers
```bash
# Add custom header
curl -H "User-Agent: MyApp/1.0" https://example.com

# Multiple headers
curl -H "Accept: application/json" \
     -H "Authorization: Bearer token123" \
     https://api.example.com
```

### Authentication
```bash
# Basic auth
curl -u username:password https://api.example.com

# Bearer token
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.example.com

# API key in header
curl -H "X-API-Key: your_api_key" \
  https://api.example.com

# API key in URL
curl "https://api.example.com?api_key=your_key"
```

## Advanced Features

### Timeouts & retries
```bash
# Connection timeout (seconds)
curl --connect-timeout 10 https://example.com

# Max time for entire operation
curl --max-time 30 https://example.com

# Retry on failure
curl --retry 3 https://example.com

# Retry delay
curl --retry 3 --retry-delay 5 https://example.com
```

### Cookies
```bash
# Send cookies
curl -b "session=abc123" https://example.com

# Save cookies to file
curl -c cookies.txt https://example.com

# Load cookies from file
curl -b cookies.txt https://example.com

# Both save and load
curl -b cookies.txt -c cookies.txt https://example.com
```

### Proxy
```bash
# Use HTTP proxy
curl -x http://proxy.example.com:8080 https://api.example.com

# With proxy authentication
curl -x http://proxy:8080 -U user:pass https://api.example.com

# SOCKS proxy
curl --socks5 127.0.0.1:1080 https://api.example.com
```

### SSL/TLS
```bash
# Ignore SSL certificate errors (not recommended for production)
curl -k https://self-signed.example.com

# Use specific SSL version
curl --tlsv1.2 https://example.com

# Use client certificate
curl --cert client.crt --key client.key https://example.com

# Show SSL handshake details
curl -v https://example.com 2>&1 | grep -i ssl
```

## Response Handling

### Output formatting
```bash
# Silent mode (no progress bar)
curl -s https://api.example.com

# Show only HTTP status code
curl -s -o /dev/null -w "%{http_code}" https://example.com

# Custom output format
curl -w "\nTime: %{time_total}s\nStatus: %{http_code}\n" \
  https://example.com

# Pretty print JSON (with jq)
curl -s https://api.example.com | jq '.'
```

### Range requests
```bash
# Download specific byte range
curl -r 0-1000 https://example.com/large-file.zip

# Resume download
curl -C - -O https://example.com/large-file.zip
```

## File Operations

### Downloading files
```bash
# Download file
curl -O https://example.com/file.zip

# Download with custom name
curl -o myfile.zip https://example.com/file.zip

# Download multiple files
curl -O https://example.com/file1.zip \
     -O https://example.com/file2.zip

# Resume interrupted download
curl -C - -O https://example.com/large-file.zip
```

### Uploading files
```bash
# FTP upload
curl -T file.txt ftp://ftp.example.com/upload/

# HTTP PUT upload
curl -T file.txt https://example.com/upload

# Form file upload
curl -F "[email protected]" https://example.com/upload
```

## Testing & Debugging

### API testing
```bash
# Test REST API
curl -X GET https://api.example.com/users
curl -X GET https://api.example.com/users/1
curl -X POST https://api.example.com/users -d @user.json
curl -X PUT https://api.example.com/users/1 -d @updated.json
curl -X DELETE https://api.example.com/users/1

# Test with verbose output
curl -v -X POST https://api.example.com/login \
  -H "Content-Type: application/json" \
  -d '{"username":"test","password":"pass"}'
```

### Performance testing
```bash
# Measure request time
curl -w "Total time: %{time_total}s\n" https://example.com

# Detailed timing
curl -w "\nDNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTLS: %{time_appconnect}s\nTransfer: %{time_starttransfer}s\nTotal: %{time_total}s\n" \
  -o /dev/null -s https://example.com
```

### Common debugging
```bash
# Show request and response headers
curl -v https://api.example.com

# Trace request
curl --trace-ascii trace.txt https://api.example.com

# Include response headers in output
curl -i https://api.example.com
```

## Common Patterns

**Quick JSON API test:**
```bash
curl -s https://api.github.com/users/octocat | jq '{name, bio, followers}'
```

**Download with progress bar:**
```bash
curl -# -O https://example.com/large-file.zip
```

**POST JSON and extract field:**
```bash
curl -s -X POST https://api.example.com/login \
  -H "Content-Type: application/json" \
  -d '{"user":"test","pass":"secret"}' | jq -r '.token'
```

**Check if URL is accessible:**
```bash
if curl -s --head --fail https://example.com > /dev/null; then
  echo "Site is up"
else
  echo "Site is down"
fi
```

**Parallel downloads:**
```bash
for i in {1..10}; do
  curl -O https://example.com/file$i.jpg &
done
wait
```

## Useful Flags

- `-X`: HTTP method (GET, POST, PUT, DELETE, etc.)
- `-d`: Data to send (POST/PUT)
- `-H`: Custom header
- `-o`: Output file
- `-O`: Save with remote filename
- `-L`: Follow redirects
- `-i`: Include headers in output
- `-I`: Headers only
- `-v`: Verbose output
- `-s`: Silent mode
- `-S`: Show errors even in silent mode
- `-f`: Fail silently on HTTP errors
- `-k`: Insecure (ignore SSL)
- `-u`: Basic authentication
- `-F`: Multipart form data
- `-b`: Send cookies
- `-c`: Save cookies
- `-w`: Custom output format

## Tips

- Use `-s` in scripts to suppress progress bar
- Combine `-sS` for silent but show errors
- Use `-L` for redirects (e.g., shortened URLs)
- Add `-v` for debugging
- Use `jq` to process JSON responses
- Save common requests as shell aliases or scripts
- Use `--config` for complex reusable requests

## Documentation

Official docs: https://curl.se/docs/
Manual: `man curl`
HTTP methods: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

「開發程式設計」分類下的熱門技能

程式設計大神.Skill開發程式設計

【全棧能力】程式設計大神.Skill:面向複雜真實專案的高階全棧程式設計助手。不止生成程式碼,而是從一句目標接手陌生程式碼庫,拆解需求、補齊實現、追到根因、完成重構、聯調前後端,並把結果推進到能執行、能驗證、能交付。覆蓋 Web、後端、指令碼、iOS、安卓、鴻蒙 ArkUI、微信小程式及其他技術棧,支援中英文工程、疑難 Bug、跨模組任務和長任務續做;用構建、日誌、真實入口、裝置或介面證據說明結果。僅問概念時直接回答,要求落地時持續推進到驗收或明確阻塞。

↓ 1125.9萬★ 82u_42bbb65f
程式設計專家Pro.Skill開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 626.9萬★ 32user_47d655f0
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 600.7萬★ 378user_741dc82b
dev-expert開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 528.1萬★ 32user_814dbe54
dev-expert-pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 104.7萬★ -user_814dbe54
程式設計專家 Pro開發程式設計

程式設計專家 Pro:融合程式設計專家 2.0.3 工程專題與程式設計大神的鴻蒙 ArkTS/ArkUI、微信小程式和小遊戲開發資料。用於專案實現、根因除錯、審查、重構、測試、架構效能分析及多端開發驗證。支援自然語言和 @專題標識,按任務讀取包內知識;只問概念時直接回答。

↓ 98.2萬★ 1user_28275a78
程式設計專家.Skill開發程式設計

程式設計專家.Skill P8級程式設計助手,25年實戰經驗技能Skill,全棧:Java/Php網站/軟體專案、API設計、Bug診斷、程式碼生成、程式碼審查、重構、測試用例、效能基準、技術選型、文件生成、任務拆解、Spec驅動、Karpathy規範、CMS二次開發、前端設計、MySQL/Mariadb、專案知識圖譜,以及工程紀律層(根因除錯硬閉環、階段導航、事故復盤/SLO、威脅建模/供應鏈安全、生產就緒/漸進式釋出、AI編碼治理、面向Agent程式碼可讀性、LLM應用安全)。支援 @標識 顯式呼叫跳過路由。

↓ 70.1萬★ 6user_613b33ea
Github開發程式設計

用 gh 命令列工具檢視 GitHub 上的 PR 檢查、工作流執行與 API 查詢的技能。

↓ 48萬★ 714Peter Steinberger

Arnarsson 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。