@API(status = STABLE)
public final class HttpUtilSimple yet advanced Http Utility
Methods
String get(String)String get(String, int)HttpResponse request(String, String, Map, byte[], int, int)HttpResponse requestJson(String, String, String)get(String)
staticSource
public static String get(String url) throws IOException, HttpException| Parameters | ||
|---|---|---|
url | String | |
| Returns | ||
String | ||
| Throws | ||
IOException | ||
HttpException | ||
get(String, int)
staticSource
public static String get(String url, int timeoutMs) throws IOException, HttpException| Parameters | ||
|---|---|---|
url | String | |
timeoutMs | int | |
| Returns | ||
String | ||
| Throws | ||
IOException | ||
HttpException | ||
public static HttpResponse request(
String method,
String url,
Map<String, String> headers,
byte[] body,
int connectTimeoutMs,
int readTimeoutMs
) throws IOException, HttpException| Parameters | ||
|---|---|---|
method | String | |
url | String | |
headers | Map<String, String> | |
body | byte[] | |
connectTimeoutMs | int | |
readTimeoutMs | int | |
| Returns | ||
HttpResponse | ||
| Throws | ||
IOException | ||
HttpException | ||
public static HttpResponse requestJson(String method, String url, String jsonBody) throws IOException, HttpException| Parameters | ||
|---|---|---|
method | String | |
url | String | |
jsonBody | String | |
| Returns | ||
HttpResponse | ||
| Throws | ||
IOException | ||
HttpException | ||