|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kwfgrid.gwes.restfulclient.RestfulClient
public class RestfulClient
Class for generating REST requests.
| Nested Class Summary | |
|---|---|
static class |
RestfulClient.Method
HTTP RESTful method. |
| Constructor Summary | |
|---|---|
RestfulClient()
|
|
| Method Summary | |
|---|---|
static String |
getMethodAsString(RestfulClient.Method method)
Get HTTP REST method as String. |
String[] |
httpDELETE(String url)
Invoke a RESTful DELETE request and return the response as list of strings. |
String[] |
httpGET(String url)
Invoke a RESTful GET request and return the response as list of strings. |
String[][] |
httpGETArray(String url)
Invoke a RESTful GET request and return the response as list of strings. |
String[] |
httpPOST(String url,
String payload)
Invoke a RESTful POST request and return the response as list of strings. |
String[] |
httpPUT(String url,
String payload)
Invoke a RESTful PUT request and return the response as list of strings. |
static List<String> |
request(URL url,
RestfulClient.Method method,
InputStream payload)
Invoke a restful request and return the response as list of strings. |
static List<List<String>> |
requestArray(URL url,
RestfulClient.Method method,
InputStream payload)
Invoke a restful request and return the response as list of list of strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RestfulClient()
| Method Detail |
|---|
public String[] httpGET(String url)
throws RemoteException
url - The target URL
RemoteException - If a parsing or IO exception of the response message occurrs.
public String[][] httpGETArray(String url)
throws RemoteException
url - The target URL
RemoteException - If a parsing or IO exception of the response message occurrs.
public String[] httpPUT(String url,
String payload)
throws RemoteException
url - The target URL
RemoteException - If a parsing or IO exception of the response message occurrs.
public String[] httpPOST(String url,
String payload)
throws RemoteException
url - The target URL
RemoteException - If a parsing or IO exception of the response message occurs.
public String[] httpDELETE(String url)
throws RemoteException
url - The target URL
RemoteException - If a parsing or IO exception of the response message occurs.
public static List<String> request(URL url,
RestfulClient.Method method,
InputStream payload)
throws org.xmlpull.v1.XmlPullParserException,
IOException
url - The target URL.method - The method (GET, PUT, ...).payload - The payload body used with POST and PUT
IOException
org.xmlpull.v1.XmlPullParserException
public static List<List<String>> requestArray(URL url,
RestfulClient.Method method,
InputStream payload)
throws org.xmlpull.v1.XmlPullParserException,
IOException
url - The target URL.method - The method (GET, PUT, ...).payload - The payload body used with POST and PUT
IOException
org.xmlpull.v1.XmlPullParserExceptionpublic static String getMethodAsString(RestfulClient.Method method)
method - The REST method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||