@ClassPreamble(author="Maksym Novozhylov <mnovozhilov@upwork.com>", date="5/31/2014", currentRevision=2, lastModified="6/3/2014", lastModifiedBy="Maksym Novozhylov", reviewers="Yiota Tsakiri") public class UpworkRestClient extends java.lang.Object
Constructor and Description |
---|
UpworkRestClient() |
Modifier and Type | Method and Description |
---|---|
static JSONObject |
getJSONObject(HttpGet request)
Get JSON response for GET
|
static JSONObject |
getJSONObject(HttpGet request,
java.lang.Integer method)
Get JSON response for GET
|
static JSONObject |
getJSONObject(HttpGet request,
java.lang.Integer method,
java.util.HashMap<java.lang.String,java.lang.String> params)
Get JSON response for GET
|
static JSONObject |
getJSONObject(HttpPost request,
java.lang.Integer method,
java.util.HashMap<java.lang.String,java.lang.String> params)
Get JSON response for POST
|
public static JSONObject getJSONObject(HttpGet request) throws JSONException
request
- Request object for GETJSONObject
JSONException
public static JSONObject getJSONObject(HttpGet request, java.lang.Integer method) throws JSONException
request
- Request object for GETmethod
- HTTP MethodJSONObject
JSONException
public static JSONObject getJSONObject(HttpGet request, java.lang.Integer method, java.util.HashMap<java.lang.String,java.lang.String> params) throws JSONException
request
- Request object for GETmethod
- HTTP methodparams
- POST parametersJSONObject
JSONException
public static JSONObject getJSONObject(HttpPost request, java.lang.Integer method, java.util.HashMap<java.lang.String,java.lang.String> params) throws JSONException
request
- Request object for POSTmethod
- HTTP methodparams
- POST parametersJSONObject
JSONException