주 메뉴 열기

wwiki β

Curl

Jhkim (토론 | 기여)님의 2022년 9월 23일 (금) 00:07 판 (옵션)

목차

옵션

-H, --header <header/@file> Pass custom header(s) to server. (ex: -H 'X-Naver-Client-Id: xxxx')

-v, --verbose Make the operation more talkative

-k, --insecure Allow insecure server connections when using SSL

-u, --user <user:password> Server user and password

--digest Use HTTP Digest Authentication

-T, --upload-file <file> Transfer local FILE to destination

-s, --silent Silent mode

예시

Post

json

$ curl --data '{"key":"value", "key2":"value2"}' --header "Content-Type: application/json" --request POST http://localhost/api