public class WebUtils extends Object
| Constructor and Description |
|---|
WebUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
downloadFile(String reqURL,
String fileLocation)
Downloads a file from the given URL and saves it to disk
|
static String |
getBody(String reqURL)
Makes a web request to the given URL and returns the body as a string
|
static com.fasterxml.jackson.databind.JsonNode |
getJson(String reqURL)
Makes a web request to the given URL and returns the body as a
JsonNode. |
static String |
post(String reqURL,
String postContent) |
public static String getBody(String reqURL)
reqURL - URL to fetchpublic static com.fasterxml.jackson.databind.JsonNode getJson(String reqURL) throws IOException
JsonNode.reqURL - URL to fetchIOExceptionpublic static void downloadFile(String reqURL, String fileLocation)
reqURL - File to fetchfileLocation - Location to save on diskpublic static String post(String reqURL, String postContent) throws IOException
IOExceptionCopyright © 2021 GeyserMC. All rights reserved.