Qiniu-curl use

Source: Internet
Author: User

Curl Command Parameters

Curl command parameters commonly used and infrequently used in this blog
Refer to the relevant documentation:
Http://www.cnblogs.com/gbyukg/p/3326825.html
Http://www.ruanyifeng.com/blog/2011/09/curl.html
http://blog.csdn.net/lansesl2008/article/details/14523303
http://blog.csdn.net/foxman209/article/details/6278093

Instance
  • -I can see the header information of HTTP response,-I also has HTML content

  • -V (lowercase v) can display the entire process of an HTTP communication, including port connections and HTTP request header information, as well as resource content.

    If the information is not enough, the following command can see a more detailed communication process, this is taking www.sina.com as an example (301 jump):

    This is in the remote directory (for me), and then the output.txt download to see.

    Putty provides two file transfer tools PSCP, Psftp detailed introduction

    PSCP actual application (upload download)

    Upload file:

    To check if the upload was successful:

    Download file:


    e:/test/indicates that in the test directory,
    If e:/test, it will be saved with the test file name

  • Directly after the Curl command add a URL, you can see the Web source.

    Response Code 301,302 difference: http://blog.sina.com.cn/s/blog_6f2274fb0100vo1b.html

  • Curl Plus-L (note is uppercase), automatically jump to www.sina.com.cn, showing the source of the Web page, because too big, not.

  • Curl plus-il (both uppercase and lowercase), displays the header information of the URL access situation.

    301 Jump, according to Location:www.sina.com.cn jump.

  • The Curl Plus-o/-o option saves the downloaded file to the specified file:
    -O: Save the file as the file name specified on the command line
    -O: Save the file to local using the default file name in the URL

    Curl Plus-vo is saved to the specified file and also displays the communication information:

    When using-O, find that the file name is not expected, as follows:

    Found to be preserved is this:

  • Send form information, there are two ways to get and post. The Get method is relatively simple, as long as the data is attached to the URL behind the line.

    Curl Plus-D simulates sending the data of the carried form

    equals an impersonation of a login request to Qiniu

    Curl Plus-X can specify what kind of request, the default is GET request, in addition, you can also specify Post,delete, such as the use of seven cattle during the validation callback exception situation can send their own server a form POST request. Can refer to seven cow settings Notifyurl not receive callback

  • Curl Plus-H allows you to specify the request header, such as the Referer case where the anti-theft chain can be verified.

  • Curl Plus-f simulates a form upload, and you can specify the IP address or URL of the upload.

  • Curl Settings Agent

Qiniu-curl use

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.