Class WebUtils

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

public final class WebUtils extends Object
Methods on web
  • Method Details

    • createConnection

      @NotNull public static @NotNull URLConnection createConnection(@NotNull @NotNull String address) throws IOException
      Create a new connection
      Parameters:
      address - the address / URL
      Returns:
      the connection
      Throws:
      IOException - If the URL is invalid or can't be connected
    • createHttpConnection

      @NotNull public static @NotNull HttpURLConnection createHttpConnection(@NotNull @NotNull String address) throws IOException
      Create a new HTTP connection
      Parameters:
      address - the address / URL
      Returns:
      the connection
      Throws:
      IOException - If the URL is invalid or can't be connected
    • createHttpsConnection

      @NotNull public static @NotNull HttpsURLConnection createHttpsConnection(@NotNull @NotNull String address) throws IOException
      Create a new HTTPS connection
      Parameters:
      address - the address / URL
      Returns:
      the connection
      Throws:
      IOException - If the URL is invalid or can't be connected