0% found this document useful (0 votes)
15 views

Deleted 18501 - Curl Cheat Sheet

The document is a cheat sheet for the cURL command line tool. It provides a summary of common cURL commands and options for tasks like sending requests, handling cookies, authentication, proxies, compression and more.

Uploaded by

mailrobertb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Deleted 18501 - Curl Cheat Sheet

The document is a cheat sheet for the cURL command line tool. It provides a summary of common cURL commands and options for tasks like sending requests, handling cookies, authentication, proxies, compression and more.

Uploaded by

mailrobertb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

cURL cheat sheet Cheat Sheet

by [deleted] via cheatography.com/18501/cs/1776/

Follow Redirects POST Data Send Header

-L -d <@ filename > -H <he​ade​r>


-d <da​ta>
Cookies User Agent
Adding an @ reads the data from file.
-b Send Cookies using cookiejar -A 'User-​Age​nt-​Name'
cookiejar HTTP Method
-c Store Cookies in cookiejar Show Response Header
-X <Me​tho​d>
cookiejar -i
Specify method to use : POST, HEAD,
-b 'n1=v1; n2=v2' Prints response headers along with
PUT, GET, DELETE
Send raw cookies using -b response content.
Output to file
Send Binary Data HEAD Request
-o <fi​len​ame>
--data​-binary @<f​ile​nam​e> -I

Does not process the file before sending. -d Write to file Sends a HEAD request. Only response
sends it in ASCII. headers are printed.
-O

Writes output to file instead of stdout


Insecure SSL Verbose output
-k / --insecure -v
Max operation time
By default all insecure requests fail. With -k, Useful to inspect headers
-m <se​con​ds>
insecure requests do not fail. > means data sent by curl
Connect Timeout < means data received by curl
Authen​tic​ation
--conn​ect​-ti​meout <se​con​ds>
-u <us​ern​ame​:pa​ssw​ord> Silent mode
Specify maximum time allowed to connect
-s
to remote server
Proxy
Does not output progress
-x <pr​oxy>
Write Out
Example : Show Error
-w <fo​rma​t>
-x 'http:​//p​rox​y:2080' -S
Defines what to display on stdout after a
completed and successful operation. When used with -s, this shows an error
Compre​ssion
curl -s -w '%{rem​ote_ip} %{time​_total} % when it fails.
--comp​ression
{http​_code} \n' -o /dev/null http:/​/an​kush.io
Curl accepts compre​ssion encoding formats Exit Codes
: gzip, deflate 6 Can't resolve host
7 Couldn't connect to host
28 Operation timeout
55 Failed to send data
56 Failed to receive data

By [deleted] Published 28th February, 2014. Sponsored by ApolloPad.com


cheatography.com/deleted- Last updated 9th May, 2016. Everyone has a novel in them. Finish
18501/ Page 1 of 1. Yours!
https://apollopad.com

You might also like