Reputation: 1086
I am new to jmeter. I am using jmeter recording for my application. When i am running the recorded script then i am getting "Unauthorized" error in response. While recording Http Authorization Manager has been already set.
My Request is following:
GET https://myapp.com/v1/report?report=reportapp&user_id=1&start_date=2015-06-24&end_date=2015-07-01
[no cookies]
Request Headers:
Accept-Language: en-US,en;q=0.5
Host: myapp1.com
Referer: http://myapp.com/
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:33.0) Gecko/20100101 Firefox/33.0
Origin: http://myapp.com
Connection: keep-alive
Accept: application/json, text/plain, */*
Please help! Thanks in advance.
Upvotes: 2
Views: 9635
Reputation: 168157
You may have to add HTTP Authorization Manager to construct proper "Authorization" header basing on username/password/domain/etc.
See Windows Authentication with Apache JMeter guide to learn more on handling different authentication types in JMeter
Upvotes: 2
Reputation: 1086
I solve the issue. I had to define the "Authorization" and its value to the HTTP Header Manager.
Upvotes: 0
Reputation: 501
Have you added 'HTTP Cookie Manager' in your recorded script? At this point it seems that some session ids are not being passed and that in turn is making you unauthorized user.
Please add Cookie Manager and compare your JMeter requests with the actual requests being sent from browser. You might be missing out some IDs that are invalidating your session.
Upvotes: 0