Request.getUserAgent
Request.getUserAgent() -> string
Description
Get the user agent of the client, as a Map with the keys os, browser, and full.
Values for os:
windowsmaciosandroidlinuxother
Values for browser:
chromefirefoxedgeiesafari
Request.getUserAgent()
/* Example:
{
browser: 'chrome'
os: 'mac'
full: 'Mozilla/5.0 (Macintosh Intel Mac OS X...'
}
*/
$downloadLink = 'win/myapp.exe'
if Request.getUserAgent().os == 'mac' {
downloadLink = 'mac/myapp.dmg'
}