Jmeter—3 http请求—content-type与参数
来源:互联网 发布:网络的消极作用 编辑:程序博客网 时间:2024/06/07 20:15
本文讲三种content-type以及在Jmeter中对应的参数输入方式
第一部分:目前工作中涉及到的content-type 有三种:
content-type:在Request Headers里,告诉服务器我们发送的请求信息是哪种格式的。
1 content-type:application/x-www-form-urlencoded
默认的。如果不指定content-type,默认使用此格式。
参数格式:key1=value1&key2=value2
2 content-type:application/json
参数为json格式
{
"key1":"value1",
"key2":"value2"
}
3 content-type:multipart/form-data [dinghanhua]
上传文件用这种格式
发送的请求示例:
第二部分 不同的content-type如何输入参数
1 content-type:application/x-www-form-urlencoded
参数可以在Parameters或Body Data里输入,格式不同,如下图所示。
这两个参数输入的tab页只能使用一个,某一个有数据后不能切换到另一个。
Parameters:
Body Data:
2 content-type:application/json
2.1 首先添加信息头管理。http请求上点击右键》添加》配置元件》 HTTP信息头管理器
2.2 信息头编辑页面,点击添加,输入content-type application/json
2.3 在http请求,Body Data中输入json格式的参数
3 content-type:multipart/form-data [dinghanhua]
在http请求编辑页面,选中Use multipart/form-data for POST
Parameters中输入除了上传的文件以外的参数:参数名和参数值
Files Upload中上传文件,参数名和MIME类型
上传文件如果不成功,修改Implementation为java试一下。
the end!
- Jmeter—3 http请求—content-type与参数
- Jmeter—http请求—content-type与参数
- Http请求中的Content-Type
- http请求中的content-type
- http请求中的Content-Type
- Http请求中Content-Type
- jmeter- Response data与Content Type
- HTTP Content-type 与 AFNetworking
- Http请求中Content-Type讲解
- Http请求中Content-Type讲解
- http请求的媒体类型Content-Type
- Http请求中Content-Type讲解
- Http请求中Content-Type详解
- Http请求中Content-Type讲解
- 在http请求中的Content-Type
- Http请求中Content-Type讲解
- jmeter post请求报400 确认Content-Type是否正确
- Content-Type引发的服务端收不到HTTP请求参数的问题
- LBF特征
- 读Lua游戏开发实践指南
- 将博客搬至CSDN
- gevent管理socket时容易忽略的错误
- 树莓派(Raspberry)更换Kail linux源
- Jmeter—3 http请求—content-type与参数
- LeetCode——1.Two SUM
- Kubernetes 1.3 的现在和未来
- DLL函数调用规则
- 心得三、做事先做人(转载)
- 技术在与不断的学习新东西&记录和搜集
- Docker安装和简单使用入门
- PAT 1098. Insertion or Heap Sort (25)
- mongodb 启动警告