Version: v0.8.1 - Beta.  We welcome contributors & feedback.

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:

Values for browser:

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'
}

See Also