I need to parse UserAgent strings from a console app and this seems like a simple way to do it, but I obviously don’t have an HttpRequest object and can’t seem to make a fake one with a User-Agent header (I get platform not supported exception). Is there any way to do this, or should I start exploring other alternatives to user agent parsing?
Share
The
User-Agentheader can be parsed by theHttpBrowserCapabilitiesclass with the help of a BrowserCapabilitiesFactory, as follows: