public class BrktRestClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BrktRestClient.Builder |
static class |
BrktRestClient.HttpError
Thrown when the server returns an unsuccessful HTTP status code.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
delete(String path,
Type type)
Delete the resource.
|
<T> T |
get(String path,
Type type)
Get the resource and deserialize to an object of the given type.
|
static com.google.gson.Gson |
newGson() |
<T> T |
post(String path,
Type type,
Map<String,Object> attrs)
Post an element map to the server and deserialize to an object of the given type.
|
public static com.google.gson.Gson newGson()
public <T> T get(String path, Type type) throws IOException, BrktRestClient.HttpError
IOExceptionBrktRestClient.HttpErrorpublic <T> T post(String path, Type type, Map<String,Object> attrs) throws IOException, BrktRestClient.HttpError
IOExceptionBrktRestClient.HttpErrorpublic <T> T delete(String path, Type type) throws IOException, BrktRestClient.HttpError
myClass is not null, deserialize
to an object of the given type.IOExceptionBrktRestClient.HttpErrorCopyright © 2015. All rights reserved.