curl https://www.google.com/robots.txt
curl -O https://www.google.com/robots.txt
curl -o google-robots.txt https://www.google.com/robots.txt
verboseな情報はSTDERRに出力される
curl --verbose https://gist.github.com/
curl --verbose https://gist.github.com/ 1> /dev/null
curl --include https://gist.github.com/
–dump-header FILENAME
curl --dump-header - https://gist.github.com/
–trace FILENAME
curl --trace - https://gist.github.com/
curl --trace-ascii - https://gist.github.com/
-X オプションでメソッド名 GET/POST/PUT/DELETE を指定すればよい
curl -X PUT -d 'example[foo]=bar' -d 'example[jane]=doe' http://example.com/api/1/example/1.json
curl --head https://gist.github.com/
curl -F "name1=value1" -F "name2=value2" http://yourdomain/execute.script
curl -F "name1=value1" -F "name2=value2" -F "profile_icon=@path/to/file.png" -F "zip_file=@path/to/zipfile.zip" http://yourdomain/execute.script
curl -v \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-X POST \
-d '{"key1":"value1"}' \
https://endpoint/
curl --basic --user user:password http://hostname/
curl --insecure https://gist.github.com/
-A, –user-agent
-e, –referer
-H, –header
curl -H "X-First-Name: Joe" http://192.168.0.1/