Friday 20 September 2019

RestTemplate: Get only response headers


public static HttpHeaders getHeaders(String url) {
 if (url == null || url.isEmpty()) {
  throw new RuntimeException("url must not be null or empty");
 }

 return REST_TEMPLATE.headForHeaders(url);
}
You can get complete working application from this link.


Previous                                                    Next                                                    Home

No comments:

Post a Comment