OKdevTV Docs
Home OKdevTV
ESC
linux 1 min read 0.7 KB Raw Markdown
On this page (4)

curl

method 지정

  • GET, POST, PUT, DELETE
text
curl -XGET https://okdevtv.com
curl -XGET https://okdevtv.com\?param=value
curl -XGET 'https://okdevtv.com?param=value'

다운로드

text
curl -O http://downloadlink

file upload

text
curl -F "userid=kenu" -F "file=/home/kenu/data/hello.txt" http://uploadlink

헤더 설정

  • -H or --header
text
curl --header 'headername: value' https://okdevtv.com

curl -XPOST 'localhost:3000/apis/tip' -H "Content-Type: application/json" -d '{"name": "kenu", "email": "[email protected]"}'