org.apache.http.client.methods.CloseableHttpResponse.removeHeaders()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.apache.http.client.methods.CloseableHttpResponse.removeHeaders()方法的一些代码示例,展示了CloseableHttpResponse.removeHeaders()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CloseableHttpResponse.removeHeaders()方法的具体详情如下:
包路径:org.apache.http.client.methods.CloseableHttpResponse
类名称:CloseableHttpResponse
方法名:removeHeaders

CloseableHttpResponse.removeHeaders介绍

暂无

代码示例

代码示例来源:origin: 3zamn/kingMicro

/**
 * 移除指定name的Header列表
 * 
 * @param name
 */
public void removeHeaders(String name){
  response.removeHeaders(name);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.clients

@Override
public void removeHeaders(String name) {
  httpResponse.removeHeaders(name);
}

代码示例来源:origin: com.machinepublishers/jbrowserdriver

public void removeContentEncoding() {
 response.get().removeHeaders("Content-Encoding");
 contentEncodingRemoved.set(true);
}

代码示例来源:origin: org.esigate/esigate-core

response.removeHeaders("Date");
response.removeHeaders("Cache-control");
response.removeHeaders("Expires");
response.setHeader("Date", DateUtils.formatDate(new Date(System.currentTimeMillis())));
response.setHeader("Cache-control", "public, max-age=" + ttl);

代码示例来源:origin: org.esigate/esigate-core

@Override
public boolean event(EventDefinition id, Event event) {
  ProxyEvent fEvent = (ProxyEvent) event;
  if (fEvent.getResponse() != null && fEvent.getResponse().containsHeader(this.name)) {
    LOG.info("Deleting header {} ", this.name);
    fEvent.getResponse().removeHeaders(this.name);
  }
  if (fEvent.getErrorPage() != null && fEvent.getErrorPage().getHttpResponse() != null
      && fEvent.getErrorPage().getHttpResponse().containsHeader(this.name)) {
    LOG.info("Deleting header {} ", this.name);
    fEvent.getErrorPage().getHttpResponse().removeHeaders(this.name);
  }
  return true;
}

代码示例来源:origin: org.esigate/esigate-core

response.removeHeaders("Via");

相关文章