Exemplo n.º 1
0
  /** @see okhttp3.Headers.Builder#removeAll(String) */
  public BaseDownloadTask removeAllHeaders(final String name) {
    if (header == null) {
      synchronized (headerCreateLock) {
        // maybe invoking checkAndCreateHear and will to be available.
        if (header == null) {
          return this;
        }
      }
    }

    header.removeAll(name);
    return this;
  }
Exemplo n.º 2
0
 /**
  * We have already handled etag, and will add 'If-Match' & 'Range' value if it works.
  *
  * @see okhttp3.Headers.Builder#add(String, String)
  */
 public BaseDownloadTask addHeader(final String line) {
   checkAndCreateHeader();
   header.add(line);
   return this;
 }
Exemplo n.º 3
0
 /**
  * We have already handled etag, and will add 'If-Match' & 'Range' value if it works.
  *
  * @see okhttp3.Headers.Builder#add(String, String)
  */
 public BaseDownloadTask addHeader(final String name, final String value) {
   checkAndCreateHeader();
   header.add(name, value);
   return this;
 }