Implemented by RestTemplate. Not often used directly, but a useful
option to enhance testability, as it can easily be mocked or stubbed.
RestTemplate
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the request
may be requestEntity, Class<T> null)the type to convert the response to, or responseType, Object... Void.class for no bodythe variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, writing the given request entity to the request,
and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the request
(may be requestEntity, Class<T> null)the type to convert the response to, or responseType, Map<String, ?> Void.class for no bodythe variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, writing the given request entity to the request,
and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the request
(may be requestEntity, Class<T> null)the type to convert the response to, or responseType)Void.class for no bodyExecute the HTTP method to the given URI template, writing the given request entity to the request,
and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the
request (may be requestEntity, ParameterizedTypeReference<T> null)the type to convert the response to, or responseType, Object... Void.class for no bodythe variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, writing the given
request entity to the request, and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the request
(may be requestEntity, ParameterizedTypeReference<T> null)the type to convert the response to, or responseType, Map<String, ?> Void.class for no bodythe variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, writing the given
request entity to the request, and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe URL url, HttpMethod the HTTP method (GET, POST, etc) method, HttpEntity<?> the entity (headers and/or body) to write to the request
(may be requestEntity, ParameterizedTypeReference<T> null)the type to convert the response to, or responseType)Void.class for no bodyExecute the HTTP method to the given URI template, writing the given
request entity to the request, and return the response as |
| public <T> ResponseEntity | Returns: the response as entitythe entity to write to the request requestEntity, Class<T> the type to convert the response to, or responseType)Void.class for no bodyExecute the request specified in the given |
| public <T> ResponseEntity | Returns: the response as entitythe entity to write to the request requestEntity, ParameterizedTypeReference<T> the type to convert the response to, or responseType)Void.class for no bodyExecute the request specified in the given |
| public <T> T | Returns: an arbitrary object, as returned by theResponseExtractorthe URI template uriTemplate, HttpMethod the HTTP method (GET, POST, etc) method, RequestCallback object that prepares the request requestCallback, ResponseExtractor<T> object that extracts the return value from the response responseExtractor, Object... the variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, preparing the request with the
|
| public <T> T | Returns: an arbitrary object, as returned by theResponseExtractorthe URI template uriTemplate, HttpMethod the HTTP method (GET, POST, etc) method, RequestCallback object that prepares the request requestCallback, ResponseExtractor<T> object that extracts the return value from the response responseExtractor, Map<String, ?> the variables to expand in the template uriVariables)Execute the HTTP method to the given URI template, preparing the request with the
|
| public <T> T | Returns: an arbitrary object, as returned by theResponseExtractorthe URL url, HttpMethod the HTTP method (GET, POST, etc) method, RequestCallback object that prepares the request requestCallback, ResponseExtractor<T> object that extracts the return value from the response responseExtractor)Execute the HTTP method to the given URL, preparing the request with the
|
| public <T> ResponseEntity | Returns: the entitythe URL url, Class<T> the type of the return value responseType, Object... the variables to expand the template uriVariables)Retrieve an entity by doing a GET on the specified URL. |
| public <T> ResponseEntity | Returns: the converted objectthe URL url, Class<T> the type of the return value responseType, Map<String, ?> the map containing variables for the URI template uriVariables)Retrieve a representation by doing a GET on the URI template. |
| public <T> ResponseEntity | Returns: the converted objectthe URL url, Class<T> the type of the return value responseType)Retrieve a representation by doing a GET on the URL. |
| public <T> T | Returns: the converted objectthe URL url, Class<T> the type of the return value responseType, Object... the variables to expand the template uriVariables)Retrieve a representation by doing a GET on the specified URL. |
| public <T> T | Returns: the converted objectthe URL url, Class<T> the type of the return value responseType, Map<String, ?> the map containing variables for the URI template uriVariables)Retrieve a representation by doing a GET on the URI template. |
| public <T> T | Returns: the converted objectthe URL url, Class<T> the type of the return value responseType)Retrieve a representation by doing a GET on the URL. |
| public HttpHeaders | Returns: all HTTP headers of that resourcethe URL url, Object... the variables to expand the template uriVariables)Retrieve all headers of the resource specified by the URI template. |
| public HttpHeaders | Returns: all HTTP headers of that resourcethe URL url, Map<String, ?> the map containing variables for the URI template uriVariables)Retrieve all headers of the resource specified by the URI template. |
| public HttpHeaders | Returns: all HTTP headers of that resourcethe URL url)Retrieve all headers of the resource specified by the URL. |
| public Set | Returns: the value of theAllow headerthe URL url, Object... the variables to expand in the template uriVariables)Return the value of the |
| public Set | Returns: the value of theAllow headerthe URL url, Map<String, ?> the variables to expand in the template uriVariables)Return the value of the |
| public Set | Returns: the value of theAllow headerthe URL url)Return the value of the |
| public <T> T | Returns: the converted objectthe URL url, Object the object to be PATCHed (may be request, Class<T> null)the type of the return value responseType, Object... the variables to expand the template uriVariables)Update a resource by PATCHing the given object to the URI template, and return the representation found in the response. |
| public <T> T | Returns: the converted objectthe URL url, Object the object to be PATCHed (may be request, Class<T> null)the type of the return value responseType, Map<String, ?> the variables to expand the template uriVariables)Update a resource by PATCHing the given object to the URI template, and return the representation found in the response. |
| public <T> T | Returns: the converted objectthe URL url, Object the object to be PATCHed (may be request, Class<T> null)the type of the return value responseType)Update a resource by PATCHing the given object to the URL, and return the representation found in the response. |
| public <T> ResponseEntity | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> responseType, Object... null)the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template,
and return the response as |
| public <T> ResponseEntity | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> responseType, Map<String, ?> null)the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template,
and return the response as |
| public <T> ResponseEntity | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> responseType)null)Create a new resource by POSTing the given object to the URL,
and return the response as |
| public URI | Returns: the value for theLocation headerthe URL url, Object the Object to be POSTed (may be request, Object... null)the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template, and return the value of
the |
| public URI | Returns: the value for theLocation headerthe URL url, Object the Object to be POSTed (may be request, Map<String, ?> null)the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template, and return the value of
the |
| public URI | Returns: the value for theLocation headerthe URL url, Object the Object to be POSTed (may be request)null)Create a new resource by POSTing the given object to the URL, and return the value of the
|
| public <T> T | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> null)the type of the return value responseType, Object... the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template, and return the representation found in the response. |
| public <T> T | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> null)the type of the return value responseType, Map<String, ?> the variables to expand the template uriVariables)Create a new resource by POSTing the given object to the URI template, and return the representation found in the response. |
| public <T> T | Returns: the converted objectthe URL url, Object the Object to be POSTed (may be request, Class<T> null)the type of the return value responseType)Create a new resource by POSTing the given object to the URL, and return the representation found in the response. |
| public void | |
| public void | |
| public void |