Package me.hsgamer.hscore.web
Class UserAgent
java.lang.Object
me.hsgamer.hscore.web.UserAgent
The user agent
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends URLConnection>
TassignToConnection
(T connection) Assign the user agent to the connectiongetAgent()
Get the agent string
-
Field Details
-
FIREFOX
User agent for Firefox -
CHROME
User agent for Chrome
-
-
Constructor Details
-
UserAgent
Create a new user agent- Parameters:
agent
- the agent string
-
-
Method Details
-
getAgent
Get the agent string- Returns:
- the agent string
-
assignToConnection
Assign the user agent to the connection- Type Parameters:
T
- the type of the connection- Parameters:
connection
- the connection- Returns:
- the connection for chaining
-