VS Web 负载测试返回 415 不支持的媒体类型,尽管 Content-Type 被指定为 application/json
VS Web Load test returning 415 Unsupported Media Type though Content-Type is specified as application/json
我正在使用 VS 创建 Web 负载测试。我正在测试我使用 WebAPI 创建的服务。 WebAPI 运行良好,我现在正在尝试对其进行 performance/load 测试。
这是一张展示我如何设置测试的图片:
当我 运行 测试时,我收到 415 Unsupported Media Type 响应。
此外,您可以看到它在请求中声明 Content-Type 在那里:
插入 headers 时,我没有看到 Content-Type 列为选项之一,所以我直接输入了。
如何正确地将 Content-Type 添加到我的负载测试中?
Expand the URL node in the editor, choose the String Body node and in the Content Type property enter a value...
我正在使用 VS 创建 Web 负载测试。我正在测试我使用 WebAPI 创建的服务。 WebAPI 运行良好,我现在正在尝试对其进行 performance/load 测试。
这是一张展示我如何设置测试的图片:
当我 运行 测试时,我收到 415 Unsupported Media Type 响应。
此外,您可以看到它在请求中声明 Content-Type 在那里:
插入 headers 时,我没有看到 Content-Type 列为选项之一,所以我直接输入了。
如何正确地将 Content-Type 添加到我的负载测试中?
Expand the URL node in the editor, choose the String Body node and in the Content Type property enter a value...