Cookies-b cookiejar | Send Cookies using cookiejar | -c cookiejar | Store Cookies in cookiejar |
-b 'n1=v1; n2=v2'
Send raw cookies using -b
Send Binary Data--data-binary | @<filename> |
Does not process the file before sending. -d sends it in ASCII.
Insecure SSLBy default all insecure requests fail. With -k, insecure requests do not fail.
Authentication-u | <username:password> |
ProxyExample :
-x 'http://proxy:2080'
CompressionCurl accepts compression encoding formats : gzip, deflate
| | POST Data-d | <@filename> | -d | <data> |
Adding an @ reads the data from file.
HTTP MethodSpecify method to use : POST, HEAD, PUT, GET, DELETE
Write to fileWrites output to file instead of stdout
Connect Timeout--connect-timeout <seconds> |
Specify maximum time allowed to connect to remote server
Write OutDefines what to display on stdout after a completed and successful operation.
curl -s -w '%{remote_ip} %{time_total} %{http_code} \n' -o /dev/null http://ankush.io
| |
Show Response HeaderPrints response headers along with response content.
HEAD RequestSends a HEAD request. Only response headers are printed.
Verbose outputUseful to inspect headers
> means data sent by curl
< means data received by curl
Show ErrorWhen used with -s, this shows an error when it fails.
Exit Codes6 | Can't resolve host | 7 | Couldn't connect to host | 28 | Operation timeout | 55 | Failed to send data | 56 | Failed to receive data |
|