I am new to JMeter, Initially I implemented GET Services for load testing which worked fine, So I started adding POST apis, which are failing with 401 Unauthorized.
I checked request body for both get and post api responses in jmeter, I can see authorization URL which was given in HTTPAuthorizationManager is appending before actual URL in GET calls, which is giving 200 OK. Where as for POST apis authorization URL is not appending which resulting 401 unauthorized error.
Can anyone help on this.
Given
Base URLof the HTTP Authorization Manager matches the current URL of the HTTP Request sampler - it will add the appropriate Authorization header to the request.It doesn't matter whether the request method is GET or POST - the header will be added. If the header is not handled for POST request on the system under test side - it's either an issue or it functions as designed, we cannot tell you this for sure.
I can only demonstrate you that JMeter adds the Authorization headers for
example.combase URL and doesn't forblazedemo.comURL:More information: How to Use HTTP Basic Authentication in JMeter