写在前边的话
git bash中带有curl命令,可以直接使用。
选项
如下为curl –help结果
Usage: curl [options…]
-A, –user-agent
–abstract-unix-socket Connect via abstract Unix domain socket
–alt-svc
–anyauth Pick any authentication method
-a, –append Append to target file when uploading
–basic Use HTTP Basic Authentication
–cacert
–capath
-B, –use-ascii Use ASCII/text transfer
-b, –cookie Send cookies from string/file
-C, –continue-at
-c, –cookie-jar
–create-dirs Create necessary local directory hierarchy
–crlf Convert LF to CRLF in upload
–crlfile
-D, –dump-header
–egd-file
–engine
–etag-save
–etag-compare
–expect100-timeout
-d, –data HTTP POST data
–data-ascii HTTP POST ASCII data
–data-binary HTTP POST binary data。例如:–data-binary @E:\tmp\accounts.json
–data-raw HTTP POST data, ‘@’ allowed
–data-urlencode HTTP POST data url encoded
–delegation
–digest Use HTTP Digest Authentication
-E, –cert
–cert-status Verify the status of the server certificate
–cert-type
–ciphers SSL ciphers to use
–compressed Request compressed response
–compressed-ssh Enable SSH compression
-e, –referer
-F, –form
–form-string
–ftp-account Account data string
–ftp-alternative-to-user
–ftp-create-dirs Create the remote dirs if not present
–ftp-method
–ftp-pasv Use PASV/EPSV instead of PORT
-f, –fail Fail silently (no output at all) on HTTP errors
–fail-early Fail on first transfer error, do not continue
–false-start Enable TLS False Start
-G, –get Put the post data in the URL and use GET
-g, –globoff Disable URL sequences and ranges using {} and []
–happy-eyeballs-timeout-ms
–haproxy-protocol Send HAProxy PROXY protocol v1 header
-H, –header
-h, –help This help text
–hostpubmd5
–http0.9 Allow HTTP 0.9 responses
-I, –head Show document info only
-i, –include Include protocol response headers in the output
-J, –remote-header-name Use the header-provided filename
-j, –junk-session-cookies Ignore session cookies read from file
–keepalive-time
–key
–key-type
–krb
–libcurl
–limit-rate
-K, –config
–connect-timeout
–connect-to
-k, –insecure Allow insecure server connections when using SSL
–interface
-L, –location Follow redirects
–location-trusted Like –location, and send auth to other hosts
–login-options
–mail-auth Originator address of the original email
–mail-from Mail from this address
–mail-rcpt Mail to this address
–mail-rcpt-allowfails Allow RCPT TO command to fail for some recipients
-l, –list-only List only mode
–local-port
-M, –manual Display the full manual
–max-filesize
–max-redirs
-m, –max-time
–metalink Process given URLs as metalink XML file
–negotiate Use HTTP Negotiate (SPNEGO) authentication
-N, –no-buffer Disable buffering of the output stream
–no-keepalive Disable TCP keepalive on the connection
–no-npn Disable the NPN TLS extension
–no-progress-meter Do not show the progress meter
–no-sessionid Disable SSL session-ID reusing
–noproxy
–ntlm Use HTTP NTLM authentication
–ntlm-wb Use HTTP NTLM authentication with winbind
–oauth2-bearer
-n, –netrc Must read .netrc for user name and password
–netrc-file
–netrc-optional Use either .netrc or URL
-O, –remote-name Write output to a file named as the remote file
–remote-name-all Use the remote file name for all URLs
-o, –output
-P, –ftp-port Use PORT instead of PASV
–ftp-pret Send PRET before PASV
–ftp-skip-pasv-ip Skip the IP address for PASV
–ftp-ssl-ccc Send CCC after authenticating
–ftp-ssl-ccc-mode
–ftp-ssl-control Require SSL/TLS for FTP login, clear for transfer
-p, –proxytunnel Operate through an HTTP proxy tunnel (using CONNECT)
–pubkey
-Q, –quote Send command(s) to server before transfer
–random-file
-q, –disable Disable .curlrc
–disable-eprt Inhibit using EPRT or LPRT
–disable-epsv Inhibit using EPSV
–disallow-username-in-url Disallow username in url
–dns-interface
–dns-ipv4-addr IPv4 address to use for DNS requests
–dns-ipv6-addr IPv6 address to use for DNS requests
–dns-servers
–doh-url
-R, –remote-time Set the remote file’s time on the local output
-r, –range
–raw Do HTTP “raw”; no transfer decoding
-S, –show-error Show error even when -s is used
-s, –silent Silent mode
–socks4
–socks4a
–socks5
–socks5-basic Enable username/password auth for SOCKS5 proxies
–socks5-gssapi Enable GSS-API auth for SOCKS5 proxies
–socks5-gssapi-nec Compatibility with NEC SOCKS5 server
–socks5-gssapi-service
–socks5-hostname
-T, –upload-file
–url
-t, –telnet-option
–tftp-blksize
–tftp-no-options Do not send any TFTP options
-U, –proxy-user
–proxy1.0
-u, –user
-V, –version Show version number and quit
-v, –verbose Make the operation more talkative
-w, –write-out
–xattr Store metadata in extended file attributes
-X, –request
–request-target Specify the target for this request
–resolve
–retry
–retry-connrefused Retry on connection refused (use with –retry)
–retry-delay
–retry-max-time
–sasl-authzid
–sasl-ir Enable initial response in SASL authentication
–service-name
-x, –proxy [protocol://]host[:port] Use this proxy
–proxy-anyauth Pick any proxy authentication method
–proxy-basic Use Basic authentication on the proxy
–proxy-cacert
–proxy-capath
–proxy-cert
–proxy-cert-type
–proxy-ciphers
- SSL ciphers to use for proxy
–proxy-crlfile
–proxy-digest Use Digest authentication on the proxy
–proxy-header
–proxy-insecure Do HTTPS proxy connections without verifying the proxy
–proxy-key
–proxy-key-type
–proxy-negotiate Use HTTP Negotiate (SPNEGO) authentication on the proxy
–proxy-ntlm Use NTLM authentication on the proxy
–proxy-pass
–proxy-pinnedpubkey
–proxy-service-name
–proxy-ssl-allow-beast Allow security flaw for interop for HTTPS proxy
–proxy-tls13-ciphers
- TLS 1.3 ciphersuites for proxy (OpenSSL)
–proxy-tlsauthtype
–proxy-tlspassword
–proxy-tlsuser
–proxy-tlsv1 Use TLSv1 for HTTPS proxy
-Y, –speed-limit
-y, –speed-time
–ssl Try SSL/TLS
–ssl-allow-beast Allow security flaw to improve interop
–ssl-no-revoke Disable cert revocation checks (Schannel)
–ssl-reqd Require SSL/TLS
-Z, –parallel Perform transfers in parallel
–parallel-immediate Do not wait for multiplexing (with –parallel)
–parallel-max Maximum concurrency for parallel transfers
–pass
–path-as-is Do not squash .. sequences in URL path
–pinnedpubkey
–post301 Do not switch to GET after following a 301
–post302 Do not switch to GET after following a 302
–post303 Do not switch to GET after following a 303
–preproxy [protocol://]host[:port] Use this proxy first
-z, –time-cond