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"的解决方法的更多相关文章

  1. springboot 报错 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    开始 controller 方法写的是 @RequestMapping( value = "/add", method = RequestMethod.POST ) public ...

  2. Jmeter发送post请求报错Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    常识普及: Content-type,在Request Headers里面,告诉服务器,我们发送的请求信息格式,在JMeter中,信息头存储在信息头管理器中,所以在做接口测试的时候,我们维护Conte ...

  3. 接入WxPusher微信推送服务出现错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

    背景 使用WxPusher微信推送服务 ,可以及时的将服务的一些运行异常信息,发送到自己的微信上,方便了解服务的运行状态(PS:这个服务是免费的). 你可以在这里看到WxPusher微信推送服务的接入 ...

  4. Content type 'application/json;charset=UTF-8' not supported异常的解决过程

    首先说一下当时的场景,其实就是一个很简单的添加操作,后台传递的值是json格式的,如下图 ,后台对应的实体类, @Data @EqualsAndHashCode(callSuper = false) ...

  5. 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 ...

  6. 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- ...

  7. org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported

    最后找到我的问题,springmvc配置文件中没加 <mvc:annotation-driven/> java代码: @RequestMapping(value="/reques ...

  8. org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported或其他Content type不支持处理

    很久没从头到尾搭框架,今天搭的过程中,springmvc controller方法入参用@RequestBody自动绑定参数时一直提示各种 not supported 排查问题有两个解决路径: 1)使 ...

  9. SpringMVC在使用JSON时报错信息为:Content type 'application/json;charset=UTF-8' not supported

    直接原因是:我的(maven)项目parent父工程pom.xml缺少必要的三个jar包依赖坐标. 解决方法是:在web子模块的pom.xml里面添加springMVC使用JSON实现AJAX请求. ...

随机推荐

  1. 对象池3(方法功能)PoolManager(控制)PoolTimeObject(时间管理)text01(调用)Destorys(销毁)

    1.对象池PoolManager namespace kernal { public class PoolManager : MonoBehaviour { //“缓冲池”集合 public stat ...

  2. 使用SVN进行源码管理

    阅读目录: 1.SVN服务端配置 1.1 创建版本库 1.2 创建用户 1.3 设置用户权限 2.SVN客户端使用 2.1 向SVN服务器中导入源码 2.1.1 直接通过TortoiseSVN向SVN ...

  3. unity发布安卓lua路径不存在问题

    项目用的是xlua 采用自定义加载方式 使用File去读取路径下的文件,lua文件本来放在了StreamingAssets路径下 PC运行无问题,发布安卓后,居然提示路径不存在. 查了下资料后发现,F ...

  4. MongoDB集群怎样去访问?

    上一章节简单介绍了MONGODB的集群搭建.相信大家都已经很熟悉了.集群搭建完接下来应该考虑我们的程序应该怎样去访问他. 怎么读写数据等操作.下面把我在工作中的一些用法列出来供大家作为参考. 官网的链 ...

  5. IDEA+Maven+多个SpringBoot子模块(创建多模块整合项目)

    https://blog.csdn.net/willjgl/article/details/77773634 https://blog.csdn.net/qqHJQS/article/details/ ...

  6. LI居中

    在用UL-LI时,有适合需要将Li里面的内容居中显示:方法有两种:(推荐)1.设置LI的display为inline(规定应该从父元素继承 display 属性的值),为LI设置长度,设置text-a ...

  7. java线程安全问题原理性分析

    1.什么是线程安全问题? 从某个线程开始访问到访问结束的整个过程,如果有一个访问对象被其他线程修改,那么对于当前线程而言就发生了线程安全问题:如果在整个访问过程中,无一对象被其他线程修改,就是线程安全 ...

  8. 如何取消IntelliJ IDEA打开默认项目配置

    一.前言            在前端中,个人比较喜欢使用IntelliJ IDEA开发工具!IntelliJ IDEA是非常强大的开发集成工具,打开IntelliJ IDEA软件默认会打开最近一次的 ...

  9. 19_AOP概述

    [AOP的使用场景] 性能测试 访问控制 事务管理 日志记录 [AOP相关术语] [ 连接点 Joinpoint ] 程序执行的某个特定位置.(假如Car类有drive()方法,那么在drive()方 ...

  10. 关于ButterKnife 设置全局配置

    先在项目的根目录的build.grade添加:classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'  然后在app build.grade ...