public static Header [ ] headUri ( String uri ) throws IOException { CloseableHttpClient c = newHttpClient ( new URL ( uri ) ) ; HttpHead head = new HttpHead ( uri ) ; LOG . debug ( "HEAD {}" , uri ) ; CloseableHttpResponse res = c . execute ( head , HttpClientContext . create ( ) ) ; checkResponse ( res ) ; return res . getAllHeaders ( ) ; }
Gets the response headers of specified uri .