Class UserAgent

java.lang.Object
me.hsgamer.hscore.web.UserAgent

public final class UserAgent extends Object
The user agent
  • Field Details

    • FIREFOX

      public static final UserAgent FIREFOX
      User agent for Firefox
    • CHROME

      public static final UserAgent CHROME
      User agent for Chrome
  • Constructor Details

    • UserAgent

      public UserAgent(String agent)
      Create a new user agent
      Parameters:
      agent - the agent string
  • Method Details

    • getAgent

      public String getAgent()
      Get the agent string
      Returns:
      the agent string
    • assignToConnection

      public <T extends URLConnection> T assignToConnection(T connection)
      Assign the user agent to the connection
      Type Parameters:
      T - the type of the connection
      Parameters:
      connection - the connection
      Returns:
      the connection for chaining