curl.exe帮助

  • Post category:other

curl.exe是一个命令行工具,用于在Windows操作系统中发送HTTP请求。curl.exe提供了详细的帮助文档,可以帮助您了解其功能和使用方法。以下是使用curl.exe帮助的完整攻略,包括两个示例说明。

步骤1:打开帮助文档

要打开curl.exe的帮助文档,您可以在命令行中输入以下命令:

curl --help

在上述命令中,--help选项用于打开帮助文档。

步骤2:查看帮助文档

打开帮助文档后,您可以查看curl.exe的详细信息和使用方法。以下是帮助文档的一部分:

“`
Usage: curl [options…]
–abstract-unix-socket Connect via abstract Unix domain socket
–anyauth Pick any authentication method (H)
-a, –append Append to target file when uploading (FTP/SFTP)
–aws-sigv4 Sign requests with AWS Signature Version 4
–basic Use HTTP Basic Authentication (H)
–cacert CA certificate to verify peer against (SSL)
–capath

CA directory to verify peer against (SSL)
-E, –cert Client certificate file and password (SSL)
–cert-status Verify the status of the server certificate (SSL)
–cert-type Certificate file type (DER/PEM/ENG) (SSL)
–ciphers SSL ciphers to use (SSL)
–compressed Request compressed response (using deflate or gzip)
–compressed-ssh Enable SSH compression
-K, –config Read config from a file
–connect-timeout Maximum time allowed for connection
–connect-to ,,… Connect to host
–continue-at Resumed transfer offset
–create-dirs Create necessary local directory hierarchy
-C, –continue Resume/continue transfer (HTTP/FTP/FILE)
–crlf Convert LF to CRLF in upload
–crlfile Get a CRL list in PEM format from the given file
–curves Allowed SSL elliptic curves (SSL)
–data HTTP POST data (H)
–data-ascii HTTP POST ASCII data (H)
–data-binary HTTP POST binary data (H)
–data-raw HTTP POST data, ‘@’ allowed (H)
–data-urlencode HTTP POST data url encoded (H)
–delegation GSS-API delegation permission
–digest Use HTTP Digest Authentication (H)
–disable-eprt Inhibit using EPRT or LPRT (default on)
–disable-epsv Inhibit using EPSV (default on)
–disallow-username-in-url Disallow username in url (H)
-D, –dump-header Write the received headers to
–egd-file EGD socket path for random data (SSL)
–engine Crypto engine to use (SSL). “–engine list” for list
–expect100-timeout How long to wait for 100-continue (default 1)
–fail Fail silently (no output at all) on HTTP errors (H)
–fail-early Fail on first transfer error, do not continue (H)
-f, –fail-with-body Fail on HTTP errors with response codes >= 400
–false-start Enable TLS False Start
-F, –form Specify HTTP multipart POST data (H)
–form-string Specify HTTP multipart POST data (H)
–ftp-account Account data string (FTP)
–ftp-alternative-to-user String to replace “USER [name]” (FTP)
–ftp-create-dirs Create the remote dirs if not present (FTP)
–ftp-method [multicwd/nocwd/singlecwd] Control CWD usage (FTP)
–ftp-pasv Use PASV/EPSV instead of PORT (FTP)
-P, –ftp-port

Use PORT instead of PASV (FTP)
–ftp-pret Send PRET before PASV (FTP)
–ftp-skip-pasv-ip Skip the IP address for PASV (FTP)
–ftp-ssl-ccc Send CCC after authenticating (FTP)
–ftp-ssl-ccc-mode Set CCC mode (FTP)
–ftp-ssl-control Require SSL/TLS for FTP login, clear for transfer (SSL/FTP)
–ftp-ssl Use SSL/TLS for the FTP session (SSL/FTP)
–ftp-ssl-reqd Require SSL/TLS for the FTP session (SSL/FTP)
–ftp-ssl-allow-beast Allow security flaw to improve compatibility (SSL/FTP)
–ftp-ssl-protect-data Require SSL/TLS for the FTP data channel (SSL/FTP)
–ftp-ssl-protect-list Require SSL/TLS for the FTP list command (SSL/FTP)
–ftp-type Specify type of the file to transfer (ASCII/BINARY) (FTP/SFTP)
–ftp-syst Override the default FTP system type (FTP)
–globoff Disable URL sequences and ranges using {} and []
-g, –globoff Disable URL sequences and ranges using {} and []
–happy-eyeballs-timeout-ms How long to wait in milliseconds for IPv6 before trying IPv4 (0 to disable, default 300)
–haproxy-protocol Send HAProxy PROXY protocol v1 header
-I, –head Show document info only
–header header/@file Pass custom header(s) to server (H)
–hostpubmd5 Hex encoded MD5 string of the host public key. (SSH)
-0, –http1.0 Use HTTP 1.0 (H)
–http1.1 Use HTTP 1.1 (H)
–http2-prior-knowledge Use HTTP 2 without HTTP/1.1 Upgrade (H)
–ignore-content-length Ignore the size of the remote resource (H)
–ignore-errors Ignore all errors (H)
–include Include protocol response headers in the output (H/F)
-i, –include Include protocol response headers in the output (H/F)
-k, –insecure Allow insecure server connections when using SSL (H)
–interface Use network INTERFACE (or address)
–ipv4 Resolve names to IPv4 addresses only
–ipv6 Resolve names to IPv6 addresses only
-j, –junk-session-cookies Ignore session cookies read from file (H)
–keepalive-time Wait SECONDS between keepalive probes
–key Private key file name (SSL/SSH)
–key-type Private key file type (DER/PEM/ENG) (SSL)
–krb Enable Kerberos with security (F)
–libcurl Dump libcurl equivalent code of this command line
–limit-rate Limit transfer speed to RATE
-l, –list-only List only mode (FTP)
–local-port Force use of RANGE for local port numbers
-L, –location Follow redirects (H)
–location-trusted Like –location, and send auth to other hosts (H)
–login-options Server login options (IMAP, POP3, SMTP)
-M, –manual Display the full manual
–mail-from Mail from this address (SMTP)
–mail-rcpt Mail to this/these addresses (SMTP)
–mail-auth

Originator address of the original email (SMTP)
–max-filesize Maximum file size to download (H/F)
–max-redirs Maximum number of redirects allowed (H)
-m, –max-time Maximum time allowed for the transfer
–metalink Process given URLs as metalink XML file
–negotiate Use HTTP Negotiate (SPNEGO) authentication (H)
–netrc-file Specify FILE for netrc
-n, –netrc Must read .netrc for user name and password
–netrc-optional Use either .netrc or URL; overrides -n
–netrc-file Specify FILE for netrc
–no-alpn Disable the ALPN TLS extension
–no-buffer Disable buffering of the output stream
–no-keepalive Disable TCP keepalive on the connection
–no-npn Disable the NPN TLS extension
–no-sessionid Disable SSL session-ID reusing (SSL)
–noproxy Comma-separated list of hosts which do not use a proxy, if one is specified
–ntlm Use HTTP NTLM authentication (H)
–ntlm-wb Use HTTP NTLM authentication with winbind (H)
–oauth2-bearer OAuth 2 Bearer Token (IMAP, POP3, SMTP)
–output Write to file instead of stdout
-o, –output Write to file instead of stdout
–pass Pass phrase for the private key (SSL/SSH)
–path-as-is Do not squash .. sequences in URL path
–pinnedpubkey FILE/HASHES Public key to verify peer against (SSL)
–post301 Do not switch to GET after following a 301 redirect (H)
–post302 Do not switch to GET after following a 302 redirect (H)
–post303 Do not switch to GET after following a 303 redirect (H)
–preproxy [protocol://]host[:port] Use this proxy first (H)
–proto Enable/disable specified protocols
–proto-default Use this protocol if none is specified
–proto-redir Enable/disable specified protocols on redirect
–proxy Use this proxy
–proxy-anyauth Pick any proxy authentication method (H)
–proxy-basic Use Basic authentication on the proxy (H)
–proxy-cacert CA certificate to verify peer against for proxy (SSL)
–proxy-capath CA directory to verify peer against for proxy (SSL)
–proxy-cert Client certificate file and password for proxy (SSL)
–proxy-cert-type Certificate file type for proxy (DER/PEM/ENG) (SSL)
–proxy-ciphers SSL ciphers to use for proxy (SSL)
–proxy-crlfile Get a proxy CRL list in PEM format from the given file
–proxy-digest Use Digest authentication on the proxy (H)
–proxy-header header/@file Pass custom header(s) to proxy (H)
–proxy-insecure Allow connections to proxies with self-signed certs (H)
–proxy-key Private key file name for proxy (SSL/SSH)
–proxy-key-type Private key file type for proxy (DER/PEM/ENG) (SSL)
–proxy-negotiate Use HTTP Negotiate (SPNEGO) authentication on the proxy (H)
–proxy-ntlm Use NTLM authentication on the proxy (H)
–proxy-pass Pass phrase for the private key for proxy (SSL/SSH)
–proxy-pinnedpubkey FILE/HASHES Public key to verify proxy with (SSL)
–proxy-service-name SPNEGO proxy service name
–proxy-ssl-allow-beast Allow security flaw to improve compatibility (SSL)
–proxy-tls13-ciphers TLS 1.3 proxy cipher suites to use (TLS 1.3)
–proxy-tlsauthtype Proxy TLS authentication type (default SRP) (TLS)
–proxy-tlspassword Proxy TLS password (TLS)
–proxy-tlsuser Proxy TLS user name (TLS)
–proxy-tls13-legacy Allow TLS 1.3 to negotiate TLS 1.2-style cipher suites (TLS 1.3)
–proxy-tls13-sigs TLS 1.3 proxy signature algorithms to use (TLS 1.3)
–proxy-tls13-ciphersuites TLS 1.3 proxy cipher suites to use (TLS 1.3)
–proxy-tls13-priorities TLS 1.3 proxy cipher string (default “default”) (TLS 1.3)
–proxy-tls13-variants TLS 1.3 proxy cipher variants to use (TLS 1.3)
–proxy-tls13-cert-types TLS 1.3 proxy certificate types to use (TLS 1.3)
–proxy-tls13-keylog File to write TLS 1.3 secrets to (TLS 1.3)
–proxy-tls13-ctx TLS 1.3 proxy context string (TLS 1.3)
–proxy-tls13-signature-algorithms TLS 1.3 proxy signature algorithms to use (TLS 1.3)
–proxy-tls13-max-send-fragment= TLS 1.3 proxy maximum outgoing plaintext fragment length (TLS 1.3)
–proxy-tls13-max-recv-fragment= TLS 1.3 proxy maximum incoming plaintext fragment length (TLS 1.3)
–proxy-tls13-session-ticket File to read TLS 1.3 session ticket from (TLS 1.3)
–proxy-tls13-session-ticket-key TLS 1.3 session ticket key (base64url encoded) (TLS 1.3)
–proxy-tls13-session-ticket-key-method TLS 1.3 session ticket key method (default “aes128gcm”) (TLS 1.3)
–proxy-tls13-session-ticket-key-is-raw TLS 1.3 session ticket key is provided in raw format (TLS 1.3)
–proxy-tls13-early-data File to read TLS 1.3 early data from (TLS 1.3)
–proxy-tls13-early-data-max= TLS 1.3 maximum amount of early data to send (TLS 1.3)
–proxy-tls13-early-data-len= TLS 1.3 length of early data to send (TLS 1.3)
–proxy-tls13-early-data-info= TLS 1.3 early data info (TLS 1.3)
–proxy-tls13-early-data-context= TLS 1.3 early data context (TLS 1.3)
–proxy-tls13-early-data-secrets= File to write TLS 1.3 early data secrets to (TLS 1.3)
–proxy-tls13-early-data-secrets-raw= File to write raw TLS 1.3 early data secrets to (TLS 1.3)
–proxy-tls13-early-data-cipher= TLS 1.3 early data cipher (TLS 1.3)
–proxy-tls13-early-data-secrets-cipher= TLS 1.3 early data secrets cipher (TLS 1.3)
–proxy-tls13-early-data-secrets-version= TLS 1.3 early data secrets version (TLS 1.3)
–proxy-tls13-early-data-secrets-label=