Curl command remarks, curl remarks

Source: Internet
Author: User
Tags http authentication http post

Curl command remarks, curl remarks

Curl is an open source file transmission tool that uses the URL syntax in the command line mode. It is widely used in Unix and multiple Linux distributions, and has DOS, Win32, and Win64 versions.


1.
Get request:
Curl "http://blog.csdn.net/undoner? Birthyear = 1905 & press = OK"


2.
Post request:
Common Parameters
Curl-d "birthyear = 1905 & press = OK" "http://blog.csdn.net/undoner"
Json Parameters
Curl-H "Content-Type: application/json"-d' {"user": {"uid": 123, "username": "abc"}, "baseinfo ": "abcde"} '"http://blog.csdn.net/undoner"


Linux curl command
-A/-- append: When uploading a file, it is appended to the target file.
-A/-- user-agent <string>: sets the user proxy to be sent to the server.
-Anyauth can use the "any" authentication method
-B/-- cookie <name = string/file> cookie string or file read location
-Basic verification with HTTP
-B/-- use-ascii use ASCII/text transmission
-C/-- cookie-jar <file>: after the operation is completed, the cookie is written to this file.
-C/-- continue-at <offset> resumable Transfer
-D/-- data <data> HTTP POST
-- Data-ascii <data> post data in ascii format
-- Data-binary <data> post data in binary mode
-- Negotiate uses HTTP Authentication
-- Digest uses digital authentication
-- Disable-eprt: disable EPRT or LPRT
-- Disable-epsv: disable the use of EPSV.
-D/-- dump-header <file>: Write the header information to this file.
-- Egd-file <file>: Set the EGD socket path for random data (SSL)
-- Tcp-nodelay use the TCP_NODELAY Option
-E/-- referer source URL
-E/-- cert <cert [: passwd]> client certificate file and password (SSL)
-- Cert-type <type> Certificate file type (DER/PEM/ENG) (SSL)
-- Key <key> private key file name (SSL)
-- Key-type <type> private key file type (DER/PEM/ENG) (SSL)
-- Pass <pass> private key and password (SSL)
-- Engine <eng> encryption engine usage (SSL). "-- engine list" for list
-- Cacert <file> CA certificate (SSL)
-- Capath <directory> CA directory (made using c_rehash) to verify peer against (SSL)
-- Ciphers <list> SSL Password
-- Compressed requires that the returned data be compressed (using deflate or gzip)
-- Connect-timeout <seconds>: sets the maximum request time.
-- Create-dirs: create the directory hierarchy of the local directory
-- Crlf upload converts LF into CRLF
-F/-- the http error is not displayed when the fail connection fails.
-- Ftp-create-dirs: If the remote directory does not exist, create a remote directory.
-- Ftp-method [multicwd/nocwd/singlecwd] controls the use of CWD
-- Ftp-pasv uses PASV/EPSV to replace the port
-- When ftp-skip-pasv-ip uses PASV, ignore this ip address.
-- Ftp-ssl tries to use SSL/TLS for ftp Data Transmission
-- Ftp-ssl-reqd requires the use of SSL/TLS for ftp Data Transmission
-F/-- form <name = content> simulate http form submission data
-Form-string <name = string> simulate http form submission data
-G/-- globoff disables the use of URL sequences and ranges {} and []
-G/-- get sends data in get Mode
-H/-- help
-H/-- header <line> Custom header information is passed to the server
-- Length of HTTP header information ignored by ignore-content-length
-I/-- include: the protocol header information is included in the output.
-I/-- head: only show Document Information
Read-j/-- junk-session-cookies from files to ignore session cookies
-Interface <interface> specify Network interface/address usage
-Krb4 <level> enabled and specified security level krb4
-J/-- junk-session-cookies read files and ignore session cookies
-- Interface <interface> use the specified network interface/address
-- Krb4 <level> Use krb4 of the specified security level
-K/-- insecure
-K/-- config: Read the specified configuration file
-L/-- list-only lists the names of objects in the ftp directory.
-- Limit-rate <rate> sets the transmission speed.
-- Local-port <NUM> force use of the local port number
-M/-- max-time <seconds>: set the maximum transmission time.
-- Max-redirs <num>: sets the maximum number of directories read.
-- Max-filesize <bytes>: sets the maximum number of downloaded files.
-M/-- manual display all manually
-N/-- netrc reads the user name and password from the netrc file
-- Netrc-optional overwrites-n using. netrc or URL
-- Ntlm uses http ntlm for authentication
-N/-- no-buffer disable buffer output
-O/-- output: Write the output to the file.
-O/-- remote-name: Write the output to this file, and keep the file name of the remote file.
-P/-- proxytunnel use HTTP Proxy
-- Proxy-anyauth select any proxy authentication method
-- Proxy-basic: Use basic Authentication on the proxy
-- Proxy-digest use digital authentication on the proxy
-- Proxy-ntlm uses ntlm for authentication on the proxy
-P/-- ftp-port <address> uses the port address instead of PASV
-Q/-- quote <cmd> before file transfer, send the command to the server
-R/-- range <range> to retrieve the byte range from HTTP/1.1 or FTP Server
-- Range-file: Random file Reading (SSL)
-R/-- remote-time: specifies the time when a local file is generated.
-- Retry <num> Number of retries when transmission fails
-- Retry-delay <seconds> when a transmission error occurs, set the retry Interval.
-- Retry-max-time <seconds> when transmission fails, set the maximum retry time.
-S/-- silent mute mode. No output
-S/-- show-error Display error
-- Socks4 -- Socks5 -- Stderr <file>
-T/-- telnet-option <OPT = val> Telnet option settings
-- Trace <file> debug the specified file
-- Trace-ascii <file> Like -- trace but no hex output
-- Add timestamp when trace-time trace/Detailed output
-T/-- upload-file <file> upload a file
-- Url <URL> Spet URL to work
-U/-- user <user [: password]> set the user and password of the server
-U/-- proxy-user <user [: password]> set the proxy user name and password
-V/-- verbose
-V/-- version: displays version information.
-W/-- write-out [format] After what output is complete
-X/-- proxy -X/-- request <command> specifies the command
-Y/-- speed-time: the time required to discard the speed limit. The default value is 30.
-Y/-- speed-limit: the speed limit for stopping transmission. The speed is in seconds.
-Z/-- time-cond transfer time settings
-0/-- http1.0 use HTTP 1.0
-1/-- tlsv1 use TLSv1 (SSL)
-2/-- sslv2 uses SSLv2 (SSL)
-3/-- sslv3 used by SSLv3 (SSL)
-- 3p-quote like-Q for the source URL for 3rd party transfer
-- 3p-url: Use a url for third-party transmission
-- 3p-user uses the user name and password for third-party transmission
-4/-- use IP4 for ipv4
-6/-- use IP6 for ipv6
-#/-- Progress-bar: Use a progress bar to display the current transfer status

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.