jmeter报"msg":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"的解决方法
1.报"msg":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"
[解决办法]
step1:在HTTP请求下添加一个“HTTP信息头管理器”
step2:在“HTTP信息头管理器”界面,新增一行信息头:content-type application/json
step3:重新请求该接口即可。
| User-Agent | Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko |
| Accept | image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */* |
| Accept-Language | zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.3 |
| content-type | application/json |
2.监听器 "察看结果树" 可以看到服务器响应数据如下:
{"status":0,"data":"Could not read JSON: Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
另外监听器捕捉到该次请求如下所示:
POST http://xxx.com/merServPlat/proc/modifySubmit.json
POST data:
%7B%22stageId%22%3A276%2C%22modifyTime%22%3Anull%2C%22merId%22%3A276%2C%22merCode%
解决方案:
POST data 里只有这些。这些明显是一个 json 串,只不过 JMeter 竟然把 json 串转义后再提交了。
修改该次 HTTP 请求的 Body Data,把要提交的 json 串考进去,保存,重新运行测试,问题解决
jmeter报"msg":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported"的解决方法的更多相关文章
- springboot 报错 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
开始 controller 方法写的是 @RequestMapping( value = "/add", method = RequestMethod.POST ) public ...
- Jmeter发送post请求报错Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
常识普及: Content-type,在Request Headers里面,告诉服务器,我们发送的请求信息格式,在JMeter中,信息头存储在信息头管理器中,所以在做接口测试的时候,我们维护Conte ...
- 接入WxPusher微信推送服务出现错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
背景 使用WxPusher微信推送服务 ,可以及时的将服务的一些运行异常信息,发送到自己的微信上,方便了解服务的运行状态(PS:这个服务是免费的). 你可以在这里看到WxPusher微信推送服务的接入 ...
- Content type 'application/json;charset=UTF-8' not supported异常的解决过程
首先说一下当时的场景,其实就是一个很简单的添加操作,后台传递的值是json格式的,如下图 ,后台对应的实体类, @Data @EqualsAndHashCode(callSuper = false) ...
- ajax使用向Spring MVC发送JSON数据出现 org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported错误
ajax使用向Spring MVC发送JSON数据时,后端Controller在接受JSON数据时报org.springframework.web.HttpMediaTypeNotSupportedE ...
- Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported告诉你,你的请求头是application/x- ...
- org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
最后找到我的问题,springmvc配置文件中没加 <mvc:annotation-driven/> java代码: @RequestMapping(value="/reques ...
- org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported或其他Content type不支持处理
很久没从头到尾搭框架,今天搭的过程中,springmvc controller方法入参用@RequestBody自动绑定参数时一直提示各种 not supported 排查问题有两个解决路径: 1)使 ...
- SpringMVC在使用JSON时报错信息为:Content type 'application/json;charset=UTF-8' not supported
直接原因是:我的(maven)项目parent父工程pom.xml缺少必要的三个jar包依赖坐标. 解决方法是:在web子模块的pom.xml里面添加springMVC使用JSON实现AJAX请求. ...
随机推荐
- oracle12C--新特性
Orcle 12c 新特性-使用DBCA创建物理备库 >>点击这里<< Orcle 12c DG 新特性-Far Sync >>点击这里<< Orcle ...
- CentOS6 克 隆
原始机子关机 自己设置名字 保存地址 开机 配置hosts 后面的为你要设置的名字不配置可能xshell链接上不了网 更改名字: 配置网卡 删除物理地址 mac 和 uuid 删除网卡 重启
- Tortoise SVN安装后右键没有菜单的解决方法
最近换了WIN7的操作系统,感觉用起来爽极了,于是开始一个个装软件,最让我头疼的就是安装SVN,安装没有问题,完成后却无法显示右键菜单,开始同事也帮我找原因,以为是我设置问题或者哪里阻止了程序,还以为 ...
- elasticsearch fitler查询例子
- BNU7538——Clickomania——————【区间dp】
Clickomania Time Limit: 10000ms Memory Limit: 32768KB 64-bit integer IO format: %I64d Java clas ...
- ASP.NET 使用 AjaxPro 实现前端跟后台交互
使用 AjaxPro 进行交互,很多人都写过文章了,为什么还要继续老生常谈呢.因为有一些细节上的东西我们需要注意,因为这些细节如果不注意的话,那么程序会报错,而且维护性较差. 引言 一.首先,还是那句 ...
- Ubuntu Cloud Image in Openstack
Ubuntu出的云环境镜像(http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img),已经 ...
- drupal对数据库操作
// nodenode_load($nid = NULL, $vid = NULL, $reset = FALSE);node_load_multiple($nids = array(), $cond ...
- javascript 权威指南
1.对象 1.1.序列话对象 JSON.stringify() 和 JSON.parse() 用来序列化和还原 javascript 对象. var o = {x:1, y:{z:[false,nul ...
- Java操作Mongodb(转载)
好文章,值得收藏 HelloWorld程序 学习任何程序的第一步,都是编写HelloWorld程序,我们也不例外,看下如何通过Java编写一个HelloWorld的程序. 首先,要通过Java操作Mo ...