Set a header name-value pair to the request.

@return 'this', so that addtional calls may be chained together
503279
public HttpClient setHeader(String name, Object value) {
        if (mHeaders == null) {
            mHeaders = new HttpHeaderMap();
        }
        mHeaders.put(name, value);
        return this;
    }
263156
public TrailingHeaders addHeader(CharSequence name, Iterable<Object> values) {
        lastHttpContent.trailingHeaders().add(name, values);
        return this;
    }
492488
public function addHeader(string $header, $value): self
    {
        $this->header->set($header, $value, false);

        return $this;
    }
617897
def header_add(self, name, value):
        
        self._set('add-header', '%s: %s' % (name, value), multi=True)

        return self._section
1366500
public T header(Header name, String value) {
		return header(name.toString(), value, true);
	}
881325
public function setHeader()
    {
        $args = func_get_args();

        if (is_array($args[0])) {
            foreach ($args[0] as $key => $value)
                $this->headers['headers'][$key] = $value;
        } else {
            $this->headers['headers'][$args[0]] = $args[1];
        }

        return $this;
    }
396651
public static Header of(String name, String value) {
        return new Header(requireNonNull(name), requireNonNull(value));
    }
567910
public T header(String name, String value) {
		return header(name, value, true);
	}
1349825
protected function addHeader(string $name, string $value) : self
    {
        $this->headers[$name] = $value;

        return $this;
    }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
1032088
public String putHeader(final String name, final String value) {
        if (headers == null) {
            headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        }
        return headers.put(name, value);
    }
76884
public void addHeader(String name, boolean required, Object value) {
        RemotingHeader header = new RemotingHeader(name, required, value);
        headers.put(name, header);
    }
1217330
public function header($name, $value = null)
    {

        if ($value === null) {
            $this->headers[] = $name;
        } else {
            $this->headers[] = $this->headerString($name, $value);
        }

        return $this;
    }
922659
def set(self, name: str, value: str) -> None:
        
        name = name.casefold()
        self._headers[name] = value
428652
def add_header(self, name: str, value: _HeaderTypes) -> None:
        
        self._headers.add(name, self._convert_header_value(value))
1155456
public void setRequestHeader(String header, String value) {
        LOG.entering(CLASS_NAME, "setRequestHeader", new Object[] {header, value});
        HttpRequestUtil.validateHeader(header);
        connection.addRequestProperty(header, value);
    }
436171
public PactDslRequestWithPath headers(Map<String, String> headers) {
      for (Map.Entry<String, String> entry: headers.entrySet()) {
        requestHeaders.put(entry.getKey(), Collections.singletonList(entry.getValue()));
      }
      return this;
    }