public class HttpClient
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static com.google.gson.JsonObject |
delete(java.lang.String url,
java.lang.String creds)
Send DELETE request to the specified URL
|
static com.google.gson.JsonObject |
delete(java.lang.String url,
java.lang.String creds,
java.lang.String jsonObj) |
static com.google.gson.JsonArray |
httpGetJSONArray(java.lang.String url,
java.lang.String creds)
Send GET request to the specified URL
|
static com.google.gson.JsonObject |
httpGetJSONObject(java.lang.String url,
java.lang.String creds)
Send GET request to the specified URL
|
static java.lang.String |
httpGetJSONString(java.lang.String url,
java.lang.String creds)
Get a string from a url.
|
static com.google.gson.JsonObject |
post(java.lang.String url,
java.lang.String creds,
com.google.gson.JsonObject obj)
Send POST request to the specified URL
|
static com.google.gson.JsonObject |
post(java.lang.String url,
java.lang.String creds,
java.lang.String jsonObj) |
static com.google.gson.JsonObject |
put(java.lang.String url,
java.lang.String creds,
com.google.gson.JsonObject obj)
Send PUT request to the specified URL
|
static com.google.gson.JsonObject |
put(java.lang.String url,
java.lang.String creds,
java.lang.String jsonObj) |
public static com.google.gson.JsonObject httpGetJSONObject(java.lang.String url, java.lang.String creds) throws java.io.IOException
url
- java.io.IOException
public static com.google.gson.JsonArray httpGetJSONArray(java.lang.String url, java.lang.String creds) throws java.io.IOException
url
- java.io.IOException
public static java.lang.String httpGetJSONString(java.lang.String url, java.lang.String creds) throws java.io.IOException
url
- the URL to perform the GET method onjava.io.IOException
public static com.google.gson.JsonObject put(java.lang.String url, java.lang.String creds, com.google.gson.JsonObject obj) throws java.io.IOException
url
- - the URL to send the request toobj
- - the JSON content to sendjava.io.IOException
public static com.google.gson.JsonObject put(java.lang.String url, java.lang.String creds, java.lang.String jsonObj) throws java.io.IOException
java.io.IOException
public static com.google.gson.JsonObject post(java.lang.String url, java.lang.String creds, com.google.gson.JsonObject obj) throws java.io.IOException
url
- - the URL to send the request toobj
- - the JSON content to sendjava.io.IOException
public static com.google.gson.JsonObject post(java.lang.String url, java.lang.String creds, java.lang.String jsonObj) throws java.io.IOException
java.io.IOException
public static com.google.gson.JsonObject delete(java.lang.String url, java.lang.String creds) throws java.io.IOException
url
- - the URL to send the request tojava.io.IOException
public static com.google.gson.JsonObject delete(java.lang.String url, java.lang.String creds, java.lang.String jsonObj) throws java.io.IOException
java.io.IOException