HttpHeaders headers = new HttpHeaders();
headers.set("Accept", "application/json");
headers.set("User-Agent", "Mozilla/5.0..."); //note - value hard coded
I am currently writing a JUnit
test where I create a RestTemplate
containing the above request headers.
I am hardcoding the user-agent
header to be Mozilla currently, how can I add the actual user agent of from which the test is running here instead of hardcoding the value?