Tutorial 2026-04-05
cURL로 API 테스트하기: 기초부터 고급 기법까지
인증, 파일 업로드, 디버깅을 다루는 실전 예제로 cURL을 마스터하세요.
cURL은 API 테스트의 만능 도구입니다.
필수 cURL 명령
GET 요청
curl -s https://api.example.com/users | jq '.'
JSON POST 요청
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"name": "Alice", "email": "[email protected]"}'
인증
curl -H "Authorization: Bearer token..." \
https://api.example.com/protected
고급 기법
타이밍 정보
curl -w "Total: %{time_total}s\n" \
-o /dev/null -s https://api.example.com/users
파일 업로드
curl -X POST https://api.example.com/upload \
-F "[email protected]"
온라인 도구와 함께 cURL을 사용하여 JSON 포맷과 JWT 디코딩을 하세요.