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

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

Introduction

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

Prototype

<T> ResponseEntity<T> getForEntity(String url, Class<T> responseType, Map<String, ?> uriVariables)
        throws RestClientException;

Source Link

Document

Retrieve a representation by doing a GET on the URI template.

Usage

From source file:org.trustedanalytics.metadata.security.authorization.RestOperationsHelpers.java

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

From source file:org.trustedanalytics.user.orgs.RestOperationsHelpers.java

public static ResponseEntity<String> getForEntityWithToken(RestOperations restTemplate, String token,
        String url, Map<String, Object> pathVars) {
    addAuthHeaderToTemplate(restTemplate, token);
    return restTemplate.getForEntity(url, String.class, pathVars);
}