When sending HTTP Request in JMeter, User-Agent header is added,e.g.:
User-Agent: Apache-HttpClient/4.5.10 (Java/1.8.0_191) Content-Type: text/plain Host: api.example.com
I didn't find any reason in documentation,
But there's a reference to its existence in JMeter docs
In this example, we created a Test Plan that tells JMeter to override the default "User-Agent" request header and use a particular Internet Explorer agent string instead.
When changing to Java in Advanced -> Implementation it doesn't send extra headers, so it's related to HTTPClient4
HttpClient sends a default User-Agent header with every request
But what is the reason behind it?
Also when I try to remove it, by adding User-Agent with empty value in Header Manager
Still it sends User-Agent with empty value, is there a way to avoid sending User-Agent header?
- Note in cUrl you can remove default User-Agent using
curl --verbose -H 'User-Agent:'