curl 命令
2015-12-30 18:39
387 查看
get request
curl "param1=value1¶m2=value2" http://www.xxx.com[/code]post request
curl -d "param1=value1¶m2=value2" http://www.xxx.com[/code]-d/--data <data>输出至文件时不输出统计信息
当将结果输出至文件或重定向至文件时,会出现如下统计信息:% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 8 0 5637 --:--:-- --:--:-- --:--:-- 5637 0 0 0 0 0 8 0 7 --:--:-- 0:00:01 --:--:-- 0 0 41 0 41 0 8 26 5 --:--:-- 0:00:01 --:--:-- 21 0 41 0 41 0 8 26 5 --:--:-- 0:00:01 --:--:-- 21
通过 -s/--silent 关闭上传文件
-F/--form <name=content>curl -F "file=@xxx.zip" http://xxx.com/uploadfile?xxx=123456 curl -F "file=@localfile;filename=nameinpost" url.com其它常用选项
--connect-timeout <seconds>: 建立连接超时时间
-m/--max-time <seconds>: 操作超时时间
-H/--header <header>: 指定 HTTP header, 如果不指定,将使用 curl 默认头。其中 User-Agent 和 Referer 也可以通过 -A/--user-agent and -e/--referer 来指定。
-v/--verbose: 显示详细信息,如请求和响应。
-X/--request <command>: 指定 HTTP method
-i, --include: (HTTP) Include the HTTP-header in the output
-I, --head: (HTTP/FTP/FILE) Fetch the HTTP-header only
相关文章推荐
- opencv_traincascade.exe用到的参数及解释
- 深度剖析之 CountdownView
- var player = ig.game.getEntitiesByType( EntityPlayer )[0];
- appcan 版本跟新
- Git
- 2015-12-30 工作笔记2
- CSDN - markdown编辑器使用方法
- jvm的GC相关概念及GC的监控
- 福利来了,全国路网数据,poi数据
- Actor的生命周期图
- Android Studio快捷键用法
- 【移动开发】数据抓包与防抓包
- Linux系列软件源码安装之一-----Git
- 禁止复制网页内容
- silverlight 鼠标事件处理
- scrollScreen
- 2015年十大热门Android开源新项目
- 第一种类型界面
- 154,UI之注意事项
- UVa 11218 - KTV