美文网首页
curl用法

curl用法

作者: ad085d162310 | 来源:发表于2017-02-23 19:49 被阅读26次

curl是一个和服务器交互信息(发送和获取信息)的命令行工具,支持DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET和TFTP等协议。curl支持代理、用户认证、FTP上传、HTTP POST请求、SSL连接、cookies、文件传输、Metalink等功能。


查看响应头

curl -i http://www.baidu.com

查看交互过程

[root@mysql ~]# curl -v www.baidu.com

  • About to connect() to www.baidu.com port 80 (#0)
  • Trying 61.135.169.121... connected
  • Connected to www.baidu.com (61.135.169.121) port 80 (#0)

GET / HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: www.baidu.com
Accept: /

< HTTP/1.1 200 OK
< Server: bfe/1.0.8.18
< Date: Thu, 23 Feb 2017 11:49:04 GMT
< Content-Type: text/html
< Content-Length: 2381
< Last-Modified: Mon, 23 Jan 2017 13:27:29 GMT
< Connection: Keep-Alive
< ETag: "588604c1-94d"
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Pragma: no-cache
< Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
< Accept-Ranges: bytes`

相关文章

  • curl工具

    (1)curl工具介绍 (2)用法  curl [options] [URL...]-A/--user-agen...

  • curl用法

    curl是一个和服务器交互信息(发送和获取信息)的命令行工具,支持DICT, FILE, FTP, FTPS, G...

  • curl命令(windows)

    常见用法 post数据到指定url curl --url -d curl参数 C:\Users\nozuodi...

  • curl 命令

    命令:curl 例子: 1、基本用法 # curl http://www.linux.com 执行后,www.li...

  • curl的用法

    在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可以说是一款很强大的http命令行工具。它...

  • curl 用法简介

    [TOC] 简介 curl is a tool to transfer data from or to a ...

  • curl工具用法

    curl工具用法 转载+修改[http://www.ruanyifeng.com/blog/2019/09/cur...

  • curl基本用法

    一、查看网页源代码 如果要保存该网页,使用"-o"参数,这相当于使用wget命令。 二、自动跳转 有的网址是自动跳...

  • Command - curl

    1. 基本用法 curl URL:URI 2. 携带请求数据 curl -X POST URL:URI -d 'p...

  • curl 的用法指南

    参考链接 Curl CookbookCurl 的用法指南 简介:curl 是常用的命令行工具,用来请求 Web 服...

网友评论

      本文标题:curl用法

      本文链接:https://www.haomeiwen.com/subject/ctobwttx.html