Get default browser User-Agent

Viewed 2441

In my application I make a few POST requests. I would like to simulate the client default browser user-agent because some websites make the most absurd checks.

Right now I just have a static one like this:

request.setRawHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0");

How can I make this dynamic?

1 Answers
Related