JMeter:如何使用PATCH方法发送参数? [英] JMeter: How to send parameters with PATCH method?

查看:779
本文介绍了JMeter:如何使用PATCH方法发送参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的JMeter版本是最新版本2.13.我想添加一个HTTP请求来测试我的API,方法是PATCH或PUT.

My JMeter version is the latest version 2.13. I would like to add an HTTP request to test my API, and the method is either PATCH or PUT.

在Postman中,我可以测试API并成功使用带有某些URL参数的PATCH方法.

In Postman, I can test the API and succeed using the PATCH method with some URL parameters.

例如:

URL: https://example.com/user/account
URL parameters: email ----> example@example.com
URL parameters: password ----> 12345678
Method: PATCH

这在Postman/Paw中有效,但在JMeter中,我设置了HTTP请求,添加了参数,但失败了.

This works in Postman/Paw but in JMeter I setup an HTTP request, add the parameters, and it fails.

如何在JMeter中使用参数设置有效的PATCH/PUT请求?

How I can setup a working PATCH/PUT request with parameters in JMeter?

推荐答案

我通过向HTTP请求中添加参数来解决了临时解决方案的问题:

I solved the problem with a temporary solution by adding the parameters to the HTTP request:

https://example.com/user/account ?email = example%40example.com& password = 12345678

,然后删除HTTP请求中的参数. 现在可以使用了.

and then delete the parameter in the HTTP request. It works now.

希望我能找到一个正式的解决方案来解决这个问题.

I hope I can find a formal solution to solve this.

这篇关于JMeter:如何使用PATCH方法发送参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆