public class HttpClient extends Object
| Constructor and Description |
|---|
HttpClient() |
| Modifier and Type | Method and Description |
|---|---|
static String |
postFile(String url,
File file) |
static String |
postForm(String url,
Map<String,String> fromData)
Post a request of type "application/x-www-form-urlencoded"
|
static String |
postString(String url,
String objStr) |
static String |
syncGet(String url) |
public static String syncGet(String url) throws IOException
IOExceptionpublic static String postString(String url, String objStr) throws IOException
IOExceptionpublic static String postFile(String url, File file) throws IOException
IOExceptionpublic static String postForm(String url, Map<String,String> fromData) throws IOException
url - urlfromData - form data stored in MapIOException - when request failsCopyright © 2022. All rights reserved.