List of usage examples for org.apache.http.client.methods HttpOptionsHC4 HttpOptionsHC4
public HttpOptionsHC4(final String uri)
From source file:com.granita.icloudcalsync.webdav.WebDavResource.java
public void options() throws URISyntaxException, IOException, HttpException { HttpOptionsHC4 options = new HttpOptionsHC4(location); @Cleanup//from w ww . ja va 2s . c om CloseableHttpResponse response = httpClient.execute(options, context); checkResponse(response); Header[] allowHeaders = response.getHeaders("Allow"); for (Header allowHeader : allowHeaders) methods.addAll(Arrays.asList(allowHeader.getValue().split(", ?"))); Header[] capHeaders = response.getHeaders("DAV"); for (Header capHeader : capHeaders) capabilities.addAll(Arrays.asList(capHeader.getValue().split(", ?"))); }