public class HTTP extends Object
| Modifier and Type | Method and Description |
|---|---|
static HttpURLConnection |
createUrlConnection(Proxy proxy,
URI uri) |
static String |
formMapToString(Map<String,String> input) |
static void |
makeRequest(Proxy proxy,
URI uri,
Object input)
Makes an HTTP request.
|
static <T> T |
makeRequest(Proxy proxy,
URI uri,
Object input,
Class<T> responseType) |
static <T> T |
makeRequest(Proxy proxy,
URI uri,
Object input,
Class<T> responseType,
Map<String,String> extraHeaders)
Makes an HTTP request.
|
static <T> T |
makeRequestForm(Proxy proxy,
URI uri,
Map<String,String> input,
Class<T> responseType)
Makes an HTTP request as a from.
|
public static void makeRequest(Proxy proxy, URI uri, Object input) throws RequestException
proxy - Proxy to use when making the request.uri - URI to make the request to.input - Input to provide in the request.IllegalArgumentException - If the given proxy or URI is null.RequestException - If an error occurs while making the request.public static <T> T makeRequest(Proxy proxy, URI uri, Object input, Class<T> responseType, Map<String,String> extraHeaders) throws RequestException
T - Type to provide the response as.proxy - Proxy to use when making the request.uri - URI to make the request to.input - Input to provide in the request.responseType - Class to provide the response as.extraHeaders - Extra headers to add to the request.IllegalArgumentException - If the given proxy or URI is null.RequestException - If an error occurs while making the request.public static <T> T makeRequest(Proxy proxy, URI uri, Object input, Class<T> responseType) throws RequestException
RequestExceptionpublic static <T> T makeRequestForm(Proxy proxy, URI uri, Map<String,String> input, Class<T> responseType) throws RequestException
T - Type to provide the response as.proxy - Proxy to use when making the request.uri - URI to make the request to.input - Input to provide in the request.responseType - Class to provide the response as.IllegalArgumentException - If the given proxy or URI is null.RequestException - If an error occurs while making the request.public static HttpURLConnection createUrlConnection(Proxy proxy, URI uri) throws IOException
IOExceptionCopyright © 2023. All rights reserved.