org.springframework.web.client.RestTemplate.headersExtractor()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中org.springframework.web.client.RestTemplate.headersExtractor方法的一些代码示例,展示了RestTemplate.headersExtractor的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RestTemplate.headersExtractor方法的具体详情如下:
包路径:org.springframework.web.client.RestTemplate
类名称:RestTemplate
方法名:headersExtractor

RestTemplate.headersExtractor介绍

[英]Return a response extractor for HttpHeaders.
[中]返回HttpHeader的响应提取器。

代码示例

代码示例来源:origin: spring-projects/spring-framework

/**
 * Returns a response extractor for {@link HttpHeaders}.
 */
protected ResponseExtractor<HttpHeaders> headersExtractor() {
  return this.syncTemplate.headersExtractor();
}

代码示例来源:origin: org.springframework/spring-web

/**
 * Returns a response extractor for {@link HttpHeaders}.
 */
protected ResponseExtractor<HttpHeaders> headersExtractor() {
  return this.syncTemplate.headersExtractor();
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public Set<HttpMethod> optionsForAllow(String url, Map<String, ?> uriVariables) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor, uriVariables);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public Set<HttpMethod> optionsForAllow(String url, Object... uriVariables) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor, uriVariables);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public Set<HttpMethod> optionsForAllow(URI url) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: spring-projects/spring-framework

@Override
@Nullable
public URI postForLocation(String url, @Nullable Object request, Map<String, ?> uriVariables)
    throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor(), uriVariables);
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: spring-projects/spring-framework

@Override
@Nullable
public URI postForLocation(String url, @Nullable Object request, Object... uriVariables)
    throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor(), uriVariables);
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public HttpHeaders headForHeaders(URI url) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor()));
}

代码示例来源:origin: spring-projects/spring-framework

@Override
@Nullable
public URI postForLocation(URI url, @Nullable Object request) throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor());
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public HttpHeaders headForHeaders(String url, Object... uriVariables) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor(), uriVariables));
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public HttpHeaders headForHeaders(String url, Map<String, ?> uriVariables) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor(), uriVariables));
}

代码示例来源:origin: org.springframework/spring-web

@Override
public Set<HttpMethod> optionsForAllow(String url, Map<String, ?> uriVariables) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor, uriVariables);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: org.springframework/spring-web

@Override
public Set<HttpMethod> optionsForAllow(String url, Object... uriVariables) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor, uriVariables);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: org.springframework/spring-web

@Override
public Set<HttpMethod> optionsForAllow(URI url) throws RestClientException {
  ResponseExtractor<HttpHeaders> headersExtractor = headersExtractor();
  HttpHeaders headers = execute(url, HttpMethod.OPTIONS, null, headersExtractor);
  return (headers != null ? headers.getAllow() : Collections.emptySet());
}

代码示例来源:origin: org.springframework/spring-web

@Override
public HttpHeaders headForHeaders(String url, Object... uriVariables) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor(), uriVariables));
}

代码示例来源:origin: org.springframework/spring-web

@Override
@Nullable
public URI postForLocation(String url, @Nullable Object request, Object... uriVariables)
    throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor(), uriVariables);
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: org.springframework/spring-web

@Override
@Nullable
public URI postForLocation(URI url, @Nullable Object request) throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor());
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: org.springframework/spring-web

@Override
@Nullable
public URI postForLocation(String url, @Nullable Object request, Map<String, ?> uriVariables)
    throws RestClientException {
  RequestCallback requestCallback = httpEntityCallback(request);
  HttpHeaders headers = execute(url, HttpMethod.POST, requestCallback, headersExtractor(), uriVariables);
  return (headers != null ? headers.getLocation() : null);
}

代码示例来源:origin: org.springframework/spring-web

@Override
public HttpHeaders headForHeaders(URI url) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor()));
}

代码示例来源:origin: org.springframework/spring-web

@Override
public HttpHeaders headForHeaders(String url, Map<String, ?> uriVariables) throws RestClientException {
  return nonNull(execute(url, HttpMethod.HEAD, null, headersExtractor(), uriVariables));
}

相关文章