好用的工具推荐——curl

curl是一款开源的文件传输工具,广泛应用于Unix、Linux及Windows平台,尤其适合进行REST API测试和ElasticSearch等服务的研究。本文将介绍curl的优势、下载地址以及解决安装过程中可能出现的问题。

介绍

curl是利用URL语法在命令行方式下工作的开源文件传输工具。它被广泛应用在Unix、多种Linux发行版中,并且有DOS和Win32、Win64下的移植版本。

优势

  • 越来越多的rest阵营
  • 越来越多的HTTP
  • 没有前端,自己做测试的神器
  • 如果研究ElasticSearch等

下载地址

https://curl.haxx.se/download.html

安装步骤

sudo tar -xzvf /home/xq/下载/curl-7.54.0.tar.gz

./configure

make

sudo make install

完成

问题

如果用curl命令的时候出现
curl: (48) An unknown option was passed in to libcurl
这个问题

就是curl和liburl版本不一致,需要去官网下载一致的版本,然后重新安装,就可以啦

xq@xq-VPCEG17YC:/usr/curl/curl-7.47.0$ curl --version
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets 
xq@xq-VPCEG17YC:/usr/curl/curl-7.47.0$ curl -I www.baidu.com
HTTP/1.1 200 OK
Server: bfe/1.0.8.18
Date: Mon, 29 May 2017 09:51:50 GMT
Content-Type: text/html
Content-Length: 277
Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT
Connection: Keep-Alive
ETag: "575e1f60-115"
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Pragma: no-cache
Accept-Ranges: bytes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值