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 |
exchange(String relativeUrl,
org.springframework.http.HttpMethod method,
Object form,
Class<T> type)
Call a rest url with the specified method and maps the response to T.
|
<T> T |
exchange(String relativeUrl,
org.springframework.http.HttpMethod method,
Object form,
Class<T> type,
Map<String,?> uriVariables)
Call a rest url with the specified method with url variables and maps the
response to T.
|
<T> T |
exchange(String relativeUrl,
org.springframework.http.HttpMethod method,
Object form,
org.springframework.core.ParameterizedTypeReference<T> type)
Call a rest url with the specified method and maps the response to the
given parameterized type.
|
<T> T |
exchange(String relativeUrl,
org.springframework.http.HttpMethod method,
Object form,
org.springframework.core.ParameterizedTypeReference<T> type,
Map<String,?> uriVariables)
Call a rest url with the specified method with url variables and maps the
response to the given parameterized type.
|
<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 |
getForObject(String relativeUrl,
org.springframework.core.ParameterizedTypeReference<T> type)
call a rest url with a GET method and maps the response to the given
parameterized type.
|
<T> T |
getForObject(String relativeUrl,
org.springframework.core.ParameterizedTypeReference<T> type,
Map<String,?> uriVariables)
call a rest url with a GET method with url variables and maps the
response to the given parameterized type.
|
<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
|
<T> T |
postForObject(String relativeUrl,
Object form,
org.springframework.core.ParameterizedTypeReference<T> type)
call a rest url with a POST method and maps the response to the given
parameterized type.
|
<T> T |
postForObject(String relativeUrl,
Object form,
org.springframework.core.ParameterizedTypeReference<T> type,
Map<String,?> uriVariables)
call a rest url with a POST method with url variables and maps the
response to the given parameterized type.
|
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 getForObject(String relativeUrl, org.springframework.core.ParameterizedTypeReference<T> type)
public <T> T getForObject(String relativeUrl, org.springframework.core.ParameterizedTypeReference<T> type, 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 <T> T postForObject(String relativeUrl, Object form, org.springframework.core.ParameterizedTypeReference<T> type)
public <T> T postForObject(String relativeUrl, Object form, org.springframework.core.ParameterizedTypeReference<T> type, Map<String,?> uriVariables)
public void put(String relativeUrl, Object form, Map<String,?> uriVariables)
public void delete(String relativeUrl, Map<String,?> uriVariables)
public <T> T exchange(String relativeUrl, org.springframework.http.HttpMethod method, Object form, Class<T> type)
public <T> T exchange(String relativeUrl, org.springframework.http.HttpMethod method, Object form, Class<T> type, Map<String,?> uriVariables)
public <T> T exchange(String relativeUrl, org.springframework.http.HttpMethod method, Object form, org.springframework.core.ParameterizedTypeReference<T> type)
public <T> T exchange(String relativeUrl, org.springframework.http.HttpMethod method, Object form, org.springframework.core.ParameterizedTypeReference<T> type, Map<String,?> uriVariables)
Copyright © 2019. All rights reserved.