简体   繁体   English

Jmeter在路径中自动添加“ /”

[英]Jmeter automatically add “/” in the path

I created, with jmeter, two requests. 我用jmeter创建了两个请求。 The first one gives me, a json containing an URL. 第一个给我,一个包含URL的json。 I parse this json to grab the URL and transfer it to the second request. 我解析此json以获取URL并将其传输到第二个请求。

My problem is that jmeter automatically add a slash to the path of the second request, I don't want/need it and it makes my application crash (The / is not present in the URL in the json). 我的问题是jmeter自动将斜线添加到第二个请求的路径中,我不需要/不需要它,这会使我的应用程序崩溃(json中的URL中不存在/)。

I tries to set a defined variable empty_path with empty value and add the variable in the path but jmeter still add the slash at the end of the URL. 我尝试使用空值设置已定义的变量empty_path并将其添加到路径中,但jmeter仍在URL末尾添加斜杠。

Do you have an idea to avoid this / ? 您是否有避免这种想法的想法?

Thanks, 谢谢,

可能添加以%20之类的HTML代码编码的空字符

You should answer my question as I am not sure to fully ubderstand your issue. 您应该回答我的问题,因为我不确定是否完全理解您的问题。

Anyway, what you could try is : 无论如何,您可以尝试的是:

I had to added a ? 我必须添加一个? mark to the end of the url to make it work, you can try it. 标记到url的末尾以使其起作用,您可以尝试一下。

If you have already has a ? 如果您已经有一个? mark, add a & mark instead. 标记,而是添加&标记。

Hope this can help you. 希望这可以帮到你。

I had the same issue because I set full URL in the field Server Name or IP . 我遇到了同样的问题,因为我在服务器名称或IP字段中设置了完整的URL。

You should set there only web domain name and in field Path set rest of URI... 您应该只在其中设置网络域名,然后在“ 路径”字段中设置URI的其余部分...

JMetter设置URL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM