Example usage for org.springframework.http HttpHeaders getLocation

List of usage examples for org.springframework.http HttpHeaders getLocation

Introduction

In this page you can find the example usage for org.springframework.http HttpHeaders getLocation.

Prototype

@Nullable
public URI getLocation() 

Source Link

Document

Return the (new) location of a resource as specified by the Location header.

Usage

From source file:org.springframework.web.client.RestTemplate.java

public URI postForLocation(String url, Object request, Object... urlVariables) throws RestClientException {
    HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request);
    HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, this.headersExtractor, urlVariables);
    return headers.getLocation();
}

From source file:org.springframework.web.client.RestTemplate.java

public URI postForLocation(String url, Object request, Map<String, ?> urlVariables) throws RestClientException {

    HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request);
    HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, this.headersExtractor, urlVariables);
    return headers.getLocation();
}

From source file:org.springframework.web.client.RestTemplate.java

public URI postForLocation(URI url, Object request) throws RestClientException {
    HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(request);
    HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, this.headersExtractor);
    return headers.getLocation();
}