You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Brian Wolfe <wo...@gmail.com> on 2023/08/07 15:34:38 UTC
HTTP Authorization Manager with HttpClient4 requests
Hi Guys,
I need to use the HttpClient4 implementation of the HttpRequest Sampler
since it seems that the Java implementation does not support the PATCH
method. Authz Manager works fine with the java implementation and inserts
the header just fine. However I noticed that switching to the httpClient4
implementation that the header is not being set on the request headers. Is
there something else I need to configure in my test plan for this to work?
I've seen examples of people doing the JSR preprocessor but I feel like
this should be working.
--
Thanks,
Brian Wolfe
https://www.linkedin.com/in/brian-wolfe-3136425a/
Re: HTTP Authorization Manager with HttpClient4 requests
Posted by Brian Wolfe <wo...@gmail.com>.
Ok I see I didn't have it under the requests scope and I had a base url set
on it. one other thing I had was I set this property in the
jmeter.properties httpclient4.auth.preemptive=false. i'm guessing there was
some difference in how the baseurl matches between implementations. But its
working now. Thx.
On Mon, Aug 7, 2023 at 11:57 AM Dmitri T <gl...@live.com> wrote:
> Brian Wolfe wrote:
> > Hi Guys,
> > I need to use the HttpClient4 implementation of the HttpRequest Sampler
> > since it seems that the Java implementation does not support the PATCH
> > method. Authz Manager works fine with the java implementation and inserts
> > the header just fine. However I noticed that switching to the httpClient4
> > implementation that the header is not being set on the request headers.
> Is
> > there something else I need to configure in my test plan for this to
> work?
> >
> > I've seen examples of people doing the JSR preprocessor but I feel like
> > this should be working.
> >
> It should work normally given that HTTP Request sampler is in the HTTP
> Authorization Manager's scope
> <https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules>
>
> See enclosed image for demo.
>
> Try enabling JMeter debug logging
> <https://www.blazemeter.com/blog/jmeter-logging> for HTTP Request and
> HTTP Authorization Manager, most probably you will see the reason there.
>
--
Thanks,
Brian Wolfe
https://www.linkedin.com/in/brian-wolfe-3136425a/
Re: HTTP Authorization Manager with HttpClient4 requests
Posted by Dmitri T <gl...@live.com>.
Brian Wolfe wrote:
> Hi Guys,
> I need to use the HttpClient4 implementation of the HttpRequest Sampler
> since it seems that the Java implementation does not support the PATCH
> method. Authz Manager works fine with the java implementation and inserts
> the header just fine. However I noticed that switching to the httpClient4
> implementation that the header is not being set on the request headers. Is
> there something else I need to configure in my test plan for this to work?
>
> I've seen examples of people doing the JSR preprocessor but I feel like
> this should be working.
>
It should work normally given that HTTP Request sampler is in the HTTP
Authorization Manager's scope
<https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules>
See enclosed image for demo.
Try enabling JMeter debug logging
<https://www.blazemeter.com/blog/jmeter-logging> for HTTP Request and
HTTP Authorization Manager, most probably you will see the reason there.