-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcurl.cli.txt
57 lines (48 loc) · 2.89 KB
/
curl.cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
┏━━━━━━━━━━┓
┃ CURL ┃
┗━━━━━━━━━━┛
curl URL... #Make a request and prints response
#BOOL --flag can be also --no-flag
#Options can be for only groups of URL... by separating with -:
#FILE usually can be - for stdin|out
-o FILE #Same as > FILE. Can create intermediaries dirs with --create-dirs
-# #Progress bar instead of counter
--connect-timeout DOUBLE #In secs
--max-time DOUBLE #In secs, for the whole operation
HTTP => (some work with FTP)
--http1.0|1.1|2 #Def: http1.1
-H "VAR:VAL;..." #Sets HTTP headers
--proxy-header STR #Same for HTTP headers to a proxy using CONNECT method
--user-agent STR #
--referer STR[;auto] #Sets Referer header. If auto (even if STR is ""), redirections will update the referer.
-L #Follows redirection (3xx status code + Location header).
#HTTP method will be get if 301|302|303, same as original otherwise.
#Max number of redirections is --max-redirs NUM (def: 50, -1 for infinity).
#Password header field is not redirected unless --location-trusted is used.
--head #Use HEAD method
-i #Includes HTTP response header in output
--data-ascii|binary|urlencode
"VAR=VAL[&VAR2=VAL2]..." #Must read online doc again and test it
-u|U USERNAME[:PASSWORD] #Authentication (use -U if proxy using CONNECT method)
-n #Uses ~/.netrc plain text file with lines machine HOST USERNAME PASSWORD
--basic #Uses HTTP Basic authentication (def)
--digest #Uses HTTP Digest authentication
-b "VAR=VAL; ..." #Sets cookies
-c FILE #Stores cookies in FILE
-D FILE #Stores requests header in FILE
--compressed #Ask for compressed response
HTTPS/FTPS ==>
--tlsv1|sslv2|3 #
--no-npn|alpn #Disable NPN|ALPN TLS extensions
--ciphers CIPHER... #
--crlfile FILE #Certificate Revocation List
[S]FTP ==>
-a #Append instead of overwriting ([S]FTP). Ignored by some servers.
--head #Only shows mtime and file size
-B #ASCII transfer mode (for text files)
-C OFFSET #Resumes/continues a file upload (if -, guesses it)
--crlf #Converts LF to CRLF
FILE ==>
--head #Only shows mtime and file size
IP ==>
--ipv4|6 #