Example usage for org.apache.http.client.methods HttpDeleteHC4 addHeader

List of usage examples for org.apache.http.client.methods HttpDeleteHC4 addHeader

Introduction

In this page you can find the example usage for org.apache.http.client.methods HttpDeleteHC4 addHeader.

Prototype

public void addHeader(String str, String str2) 

Source Link

Usage

From source file:at.bitfire.davdroid.webdav.WebDavResource.java

public void delete() throws URISyntaxException, IOException, HttpException {
    HttpDeleteHC4 delete = new HttpDeleteHC4(location);

    if (properties.eTag != null)
        delete.addHeader("If-Match", properties.eTag);

    @Cleanup/*  w ww .  j av a2s .  c o m*/
    CloseableHttpResponse response = httpClient.execute(delete, context);
    checkResponse(response);
}

From source file:com.granita.icloudcalsync.webdav.WebDavResource.java

public void delete() throws URISyntaxException, IOException, HttpException {
    HttpDeleteHC4 delete = new HttpDeleteHC4(location);

    if (getETag() != null)
        delete.addHeader("If-Match", getETag());

    @Cleanup/*from   ww w  .j  ava 2s . co  m*/
    CloseableHttpResponse response = httpClient.execute(delete, context);
    checkResponse(response);
}