Example usage for org.springframework.web.client RestOperations postForEntity

List of usage examples for org.springframework.web.client RestOperations postForEntity

Introduction

In this page you can find the example usage for org.springframework.web.client RestOperations postForEntity.

Prototype

<T> ResponseEntity<T> postForEntity(String url, @Nullable Object request, Class<T> responseType,
        Map<String, ?> uriVariables) throws RestClientException;

Source Link

Document

Create a new resource by POSTing the given object to the URI template, and returns the response as HttpEntity .

Usage

From source file:org.trustedanalytics.metricsprovider.cloudadapter.RestOperationsHelpers.java

public static <T> ResponseEntity<T> postForEntityWithToken(RestOperations restTemplate, String token,
        String url, Object request, Class<T> type, Map<String, ?> pathVars) {
    addAuthHeaderToTemplate(restTemplate, token);
    return restTemplate.postForEntity(url, request, type, pathVars);
}