Adds an HTTP header to this request.
@param key   the header key.
@param value the header value.
335191
public void addHeader(String key, String value) {
        if (key.equals("As-User")) {
            for (int i = 0; i < this.headers.size(); i++) {
                if (this.headers.get(i).getKey().equals("As-User")) {
                    this.headers.remove(i);
                }
            }
        }
        if (key.equals("X-Box-UA")) {
            throw new IllegalArgumentException("Altering the X-Box-UA header is not permitted");
        }
        this.headers.add(new RequestHeader(key, value));
    }
1064684
public static void header(Header header, String value) {
        Objects.requireNonNull(header, Required.HEADER.toString());
        
        Map<Header, String> newHeaders = new EnumMap<>(headers);
        newHeaders.put(header, value);
        headers = newHeaders;
    }
1171383
public void addHeader(String name, String value) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("The header name must not be null or empty.");
        }

        if (value == null) {
            throw new IllegalArgumentException("The header value must not be null.");
        }

        this.headers.put(name, value);
    }
240160
public function header($key, $value=null,$http_response_code=null) {
        if($value) {
            $key = $key.':'.$value;
        }
        headers_sent() or header($key,true,$http_response_code);
    }
1080921
private void setHeader(HttpServletResponse response, String name, String value) {
        if(response.containsHeader(value)) {
              response.setHeader(name, value);
        } else {
            response.addHeader(name, value);
        }
    }
675012
public ParallecHeader addPair(String key, String value) {
        this.headerMap.put(key, value);
        return this;
    }
684914
public void setHeader(String name, Object value) {
    verifyType(name, value);
    if (value != null) {
      // Modify header if necessary
      if (!ObjectUtils.nullSafeEquals(value, getHeader(name))) {
        this.modified = true;
        this.headers.put(name, value);
      }
    } else {
      // Remove header if available
      if (this.headers.containsKey(name)) {
        this.modified = true;
        this.headers.remove(name);
      }
    }
  }
439590
public void addRequestProp(String key, Object value) {
        if (key == null || value == null) {
            return;
        }
        if (requestProps == null) {
            requestProps = new HashMap<String, Object>(16);
        }
        requestProps.put(key, value);
    }
1363475
@Override
    public void setResponseHeader(String key, String value) {
        this.response.setResponseHeader(key, value);
    }
335077
public void setHeader(String name, String value) {
	headers = ReqRspUtil.set(headers, name, value);
    }
782085
@Override
    public void addHeader(String hdr, String value) {
        this.response.addHeader(hdr, value);
    }
76884
public void addHeader(String name, boolean required, Object value) {
        RemotingHeader header = new RemotingHeader(name, required, value);
        headers.put(name, header);
    }
502327
public static Action header(final String key, final String value) {
        return new Action(input -> {
            input.setHeader(key, value);
            return input;
        });
    }
774452
private void addHeaders(HttpRequest request, Map<String, String> headers) {
		for (Map.Entry<String, String> key : headers.entrySet()) {
			request.addHeader(key.getKey(), key.getValue());
		}
	}
210364
public Request header(String key, String value) {
        this.headers.put(key, value);
        return this;
    }
223510
public ServiceFault addRequestParam(String key, String value) {
        if (requestParams == null)
            requestParams = new ArrayList<>();

        requestParams.add(new NameValuePair(key, value));

        return this;
    }
1335473
public void set(String name, String value)
    {
        HeaderName hn = getHeaderName(name);
        set(hn, value);
    }