HttpRequestBuilder { public void removeHeaderIgnoreCase(String name) { if (headers == null || name == null) { return; } List<String> list = headers.keySet().stream() .filter(k -> name.equalsIgnoreCase(k)) .collect(Collectors.toList()); list.forEach(k -> headers.remove(k)); }  HttpRequestBuilder copy(); void setUrl(String url); String getUrl(); String getHeader(String name); String getParam(String name); String getUrlAndPath(); void addPath(String path); List<String> getPaths(); void removeHeader(String name); void removeHeaderIgnoreCase(String name); void setHeaders(MultiValuedMap headers); void setHeader(String name, Object value); void setHeader(String name, String value); void setHeader(String name, List<String> values); MultiValuedMap getHeaders(); void removeParam(String name); void setParam(String name, String value); void setParam(String name, List<String> values); MultiValuedMap getParams(); void removeCookie(String name); void setCookie(Cookie cookie); Map<String, Cookie> getCookies(); void setCookies(Map<String, Cookie> cookies); void removeFormField(String name); void setFormField(String name, String value); void setFormField(String name, List<String> values); MultiValuedMap getFormFields(); void addMultiPartItem(String name, ScriptValue value); void addMultiPartItem(MultiPartItem item); List<MultiPartItem> getMultiPartItems(); ScriptValue getBody(); void setBody(ScriptValue body); void setMethod(String method); String getMethod(); String getContentType(); void setSoapAction(String soapAction); String getSoapAction(); boolean isRetry(); String getRetryUntil(); void setRetryUntil(String retryUntil);  }
@Test public void testRemoveHeaderIgnoreCase() { HttpRequestBuilder request = new HttpRequestBuilder(); request.setHeader("Content-Length", "100"); Match.equals(request.getHeaders(), "{ 'Content-Length': ['100'] }"); request.removeHeaderIgnoreCase("content-length"); Match.equals(request.getHeaders(), "{}"); }