Linux curl命令模拟Http请求(get/post),绑定host访问
来源:互联网 发布:linux curl 请求url 编辑:程序博客网 时间:2024/06/05 02:58
linux curl模拟http请求发送数据:
①get方式提交数据:
curl -G -d “name=value&name2=value2” http://www.baidu.com
②post方式提交数据:
post数据:
curl -d “name=value&name2=value2” http://www.baidu.com
post文件:
curl -d a=b&c=d&txt@/tmp/txt http://www.baidu.com
以表单的方式上传文件,upload_file是方法名:
curl -F “paper_file=@/root/test.txt” “http://www.baidu.com/upload_file”
相当于设置form表单的method=”POST”和enctype=’multipart/form-data’两个属性。
③绑定host访问网页
假设访问页面地址为: http://www.iamlauy.com/abc/test
www.iamlauy.com 域名解析到ip: 192.168.0.1
则curl访问方式为如下:
curl -H “Host:www.iamlauy.com” “http://192.168.0.1/abc/test”
阅读全文
0 0
- Linux curl命令模拟Http请求(get/post),绑定host访问
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求。
- Linux 下curl模拟Http 的get or post请求。
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求
- Linux 下curl模拟Http 的get or post请求。
- 使用curl 命令模拟POST/GET请求
- curl模拟Http 的get 或 post请求
- curl模拟http发送get或post请求
- curl模拟Http 的get or post请求
- PHP 模拟CURL分别GET POST进行HTTP请求
- Linux 下模拟Http 的get or post请求(curl和wget两种方法)
- Linux 下模拟Http 的get or post请求(curl和wget两种方法)
- Linux下模拟http的get/post请求(curl or wget)
- spring data redis 操作redis
- TCP/IP四层模型与OSI参考模型
- 剑指offer面试题59 对称的二叉树(java实现)
- Hystrx权威指南--Hystrix是什么
- Chapter04 编写基本的MapReduce程序(三) 非JAVA语言编写mapreduce程序2
- Linux curl命令模拟Http请求(get/post),绑定host访问
- 8.7 特征分解
- redis集群搭建
- Storm-HBase集成--配置和开发
- 使用docker部署codis
- ETL之kettle数据同步
- Android 开发实用小技巧
- MySQL索引介绍
- GO学习系列:设计模式 --- 简单工厂模式