request.agent()
Access:
public

This is the request.agent class. It contains information about the client by parsing the user-agent. This is class is a wrapper of faisalman's ua-parser-js package.

Summary

Name
Description
Returns the browser class.
cpu
Returns the cpu class.
Returns the device class.
Returns the engine class.
os
Returns the os class.
Returns the full User-Agent string.

Functions

.browser()
Access:
public
Summary:
Returns the browser class.

This function returns the browser class. This class contains information about the browser the client was using when sending the request.

Returns

Type
Class
Description
The browser class.
.cpu()
Access:
public
Summary:
Returns the cpu class.

This function returns the cpu class. This class contains information about the cpu the client was using when sending the request.

Returns

Type
Class
Description
The cpu class.
.device()
Access:
public
Summary:
Returns the device class.

This function returns the device class. This class contains information about the device the client was using when sending the request.

Returns

Type
Class
Description
The device class.
.engine()
Access:
public
Summary:
Returns the engine class.

This function returns the engine class. This class contains information about the engine the client was using when sending the request.

Returns

Type
Class
Description
The engine class.
.os()
Access:
public
Summary:
Returns the os class.

This function returns the os class. This class contains information about the os the client was using when sending the request.

Returns

Type
Class
Description
The os class.
.string()
Access:
public
Summary:
Returns the full User-Agent string.

This function will return the full User-Agent header the client send. The User-Agent header contains information about the system the client is using and can therefore be used to get some information about the client. Please note that the client is able to fake his/her User-Agent, so this information shouldn't be depended on.

Returns

Type
String
Description
The full User-Agent string.