Jmeter不显示GraphQL查询的JSON响应

问题描述 投票:0回答:1

查看结果树显示绿色302,并表示有响应,但是jmeter未显示它。我没有跟随重定向或将响应保存为启用MD5哈希。我遵循了基本查询的另一个示例,该示例似乎正在运行,因此我猜测查询可能存在某些问题。

enter image description here

{"query":"lookup(lookupId:""TH53158""){data}"}

我已经阅读过jmeter中引号的转义键对于查询是“”,但是还没有其他示例。如何修复jmeter以获得良好的json响应?

json jmeter graphql
1个回答
0
投票

什么方法? GETPOST

  1. GET,您需要使用query URL参数传递您的请求,例如:

    enter image description here

  2. POST,您需要使用HTTP Request采样器的“身体数据”选项卡传递您的请求

    enter image description here

    此外,您需要添加HTTP Header Manager来发送相关的Content-Type标头:

    enter image description here

更多信息:GraphQL - Serving over HTTP

© www.soinside.com 2019 - 2024. All rights reserved.