public class RestClient extends Object
RestTemplate| Constructor and Description |
|---|
RestClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String relativeUrl,
Map<String,?> uriVariables)
call a rest url with a DELETE method with url variables
|
<T> T |
getForObject(String relativeUrl,
Class<T> responseClass)
call a rest url with a GET method and maps the response to T
|
<T> T |
getForObject(String relativeUrl,
Class<T> responseClass,
Map<String,?> uriVariables)
call a rest url with a GET method with url variables and maps the
response to T
|
<T> T |
postForObject(String relativeUrl,
Object form,
Class<T> responseClass)
call a rest url with a POST method and maps the response to T
|
<T> T |
postForObject(String relativeUrl,
Object form,
Class<T> responseClass,
Map<String,?> uriVariables)
call a rest url with a POST method with url variables and maps the
response to T
|
void |
put(String relativeUrl,
Object form)
call a rest url with a PUT method
|
void |
put(String relativeUrl,
Object form,
Map<String,?> uriVariables)
call a rest url with a PUT method with url variables
|
void |
setRestServerUrl(String restServerUrl) |
void |
setRestTemplate(org.springframework.web.client.RestTemplate restTemplate) |
public void setRestServerUrl(String restServerUrl)
public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
public <T> T getForObject(String relativeUrl, Class<T> responseClass)
public <T> T getForObject(String relativeUrl, Class<T> responseClass, Map<String,?> uriVariables)
public <T> T postForObject(String relativeUrl, Object form, Class<T> responseClass)
public <T> T postForObject(String relativeUrl, Object form, Class<T> responseClass, Map<String,?> uriVariables)
public void put(String relativeUrl, Object form, Map<String,?> uriVariables)
Copyright © 2017. All rights reserved.