public class JSONClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseUrl |
protected String |
password |
protected String |
username |
| Constructor and Description |
|---|
JSONClient(String baseUrl,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
protected net.sf.json.JSONObject |
doDelete(String restPath) |
protected net.sf.json.JSONObject |
doGet(String restPath) |
protected net.sf.json.JSONObject |
doGet(String restPath,
boolean returnsArray)
Set returnsArray to true if the API method returns a limit of items.
|
protected net.sf.json.JSONObject |
doPost(String restPath,
net.sf.json.JSONObject payload) |
protected String baseUrl
protected String username
protected String password
protected net.sf.json.JSONObject doGet(String restPath) throws IOException
IOExceptionprotected net.sf.json.JSONObject doGet(String restPath, boolean returnsArray) throws IOException
restPath - returnsArray - IOExceptionprotected net.sf.json.JSONObject doPost(String restPath, net.sf.json.JSONObject payload) throws IOException
IOExceptionprotected net.sf.json.JSONObject doDelete(String restPath) throws IOException
IOExceptionCopyright © 2016. All rights reserved.