Package me.hsgamer.hscore.web
Class WebUtils
java.lang.Object
me.hsgamer.hscore.web.WebUtils
Methods on web
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull URLConnectioncreateConnection(@NotNull String address) Create a new connectionstatic @NotNull HttpURLConnectioncreateHttpConnection(@NotNull String address) Create a new HTTP connectionstatic @NotNull HttpsURLConnectioncreateHttpsConnection(@NotNull String address) Create a new HTTPS connection
-
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
-