在做post接口测试过程中,http信息头管理器Content-Type配置的application/json,但是发出去的格式是text/plain,导致响应结果报HTTP Status 400 – Bad Request,如下

jmeter 发送post接口,Content-Type配置的application/json,发出去的是text/plain导致报HTTP Status 400 – Bad Request的问题jmeter 发送post接口,Content-Type配置的application/json,发出去的是text/plain导致报HTTP Status 400 – Bad Request的问题

 

jmeter 发送post接口,Content-Type配置的application/json,发出去的是text/plain导致报HTTP Status 400 – Bad Request的问题

 

 

反复在网上百度,还是没有解决问题,最后自己发现原来是自己配置的 http信息头管理器Content-Type后面多了空格导致报错

jmeter 发送post接口,Content-Type配置的application/json,发出去的是text/plain导致报HTTP Status 400 – Bad Request的问题

 

 

在http信息头管理器把Content-Type后面多余的空格去掉后,运行正常

jmeter 发送post接口,Content-Type配置的application/json,发出去的是text/plain导致报HTTP Status 400 – Bad Request的问题

 

 

总结,测试还是要多在意细节呀~~~QAQ

 

相关文章:

  • 2022-12-23
  • 2021-07-16
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2021-06-19
  • 2021-12-04
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-03-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案