[prev in list] [next in list] [prev in thread] [next in thread]
List: jmeter-user
Subject: Re: How to pass complete url to next request
From: Dmitri T <glinius () live ! com>
Date: 2023-02-20 18:31:40
Message-ID: PH7PR12MB71391F5FB2D0D70D9F70A2B5C0A49 () PH7PR12MB7139 ! namprd12 ! prod ! outlook ! com
[Download RAW message or body]
Sunil Malgaya wrote:
> Dear JMeter experts,
>
> In my output json response I get fully constructed urls (https:\\abc.com\info)
> and want to pass on as is to the next request (http sampler). So I
> preserved the url in a variable but when I pass this to the next request I
> get an invalid url exception because http is already added to the url.
>
> So does anyone know any alternative or option to get this done?
>
> Thanks,
> SM
>
Put the JMeter Variable holding the URL into "Path" field of the HTTP
Request sampler.
Alternatively use JSR223 PreProcessor
<https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PreProcessor>
and split the URL into scheme, host, port and path and populate the
Samplers fields accordingly.
Example Groovy <https://www.blazemeter.com/blog/apache-groovy> code:
def url =new URL(vars.get('put-your-variable-name-here'))
sampler.setProtocol(url.getProtocol())
sampler.setDomain(url.getHost())
sampler.setPath(url.getPath())
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic