Package me.romvnly.TownyPlus.util
Class WebUtils
java.lang.Object
me.romvnly.TownyPlus.util.WebUtils
-
Constructor Details
-
WebUtils
public WebUtils()
-
-
Method Details
-
getToken
-
getBody
Makes a web request to the given URL and returns the body as a string- Parameters:
reqURL- URL to fetch- Returns:
- Body contents or error message if the request fails
-
post
Post a string to the given URL- Parameters:
reqURL- URL to post topostContent- String data to post- Returns:
- String returned by the server
- Throws:
IOException
-
postForm
Post fields to a URL as a form- Parameters:
reqURL- URL to post tofields- Form data to post- Returns:
- String returned by the server
- Throws:
IOException
-