Request Options

-X —request

 Set HTTP Method
 Generally "-X GET" option is set as default

-H —header <header>

 Add on Header
 -H ""
 헤더를 보낸다.
 -H 'content-type: application/json'
 Add several -H for more than one header.

-d, —data <name=content>

 Send data as query string.
 -d is by default '-data-ascii'
 For binary data, '-data-binary' for url-encoded '-data-encode'

 contentType of request header must be:
 -H 'content-type: application/x-www-form-urlencoded'

-f, —form <name=content>

 Upload binary file.

 contentType of request header must be:
 -H 'content-type: multipart/form-data'

 For file path prepend @ in front of the path.
 -f 'file=@/var/log/a.file'

-K, —config

 Send request as with config file.



Response Options

-o, —output

 Similar to redirection('>').
 Write ouput to a file instead of stdout.

-w, —write-format

 Format the response.
 eg. %{content_type}, %{http_code}, %{time_toal}