Set value for API headers.
170722
def api_headers(self, value):
        """"""
        value = validators.validate_api_headers("api_headers", value)
        self._set_option("api_headers", value)
10442
function(name, value) {
    var header = { raw: value };
    this.headers[Utils.headerize(name)] = [header];
  }
1241941
public T header(String name, String value) {
        connection.setRequestProperty(name, value);
        return (T) this;
    }
556564
public void setHeader(String name, String value) {
		if (headers == null) {
			headers = new HashMap<String, String>();
		}
		if (value != null) {
			headers.put(name, value);
		} else {
			headers.remove(name);
		}
	}
815479
def set_headers(self, headers):
        
        self.headers = []
        if 'order' in self.options:
            for element in self.options['order']:
                for header in headers:
                    if header['key'] == element:
                        self.headers.append(header)
                        break
        else:
            self.headers = headers
760016
function setOverrideHeader(res, name, value) {

  if (res._headers && res._headers[name] !== undefined) {
    return true;
  }

  res.setHeader(name, value);
  return true;
}
922659
def set(self, name: str, value: str) -> None:
        
        name = name.casefold()
        self._headers[name] = value
1300341
def set_response_defaults(self, response, request=None):
        """"""
        for header_name, header_value in self.response_headers:
            response.set_header(header_name, header_value)
        if self.set_status:
            response.status = self.set_status
        response.content_type = self.content_type(request, response)
1031341
def set_header(self, name, value):
        '''  '''
        self._headers[_hkey(name)] = [str(value)]
1098718
private function setRequestHeaders($headers = array()) {
        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }
        curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);
    }
1330929
public function set(string $name, string $value): void
    {
        $key = strtolower($name);
        $this->headers[$key] = [$name, $value];
    }
1324250
public HttpHeaders set(HttpHeaders headers) {
        checkNotNull(headers, "headers");

        clear();

        if (headers.isEmpty()) {
            return this;
        }

        for (Entry<String, String> entry : headers) {
            add(entry.getKey(), entry.getValue());
        }
        return this;
    }
1309583
@Override
	public void setDateHeader(final String name, final long value) {
		headers.put(name, String.valueOf(value));
	}
652810
def set_all(params = self.class::DEFAULT_REQUEST_HEADER)
      params = params.data if params.class <= Resource
      params = Hash[params.map { |(k, v)| [k.to_s, v] }]
      params.each { |key, value| set(key.to_s, value) }
      self
    end
1121748
def addHeader(self, name, value, must_understand=False):
        
        self.headers[name] = value
        self.headers.set_required(name, must_understand)
666413
public void setAllowHeaders(String... headers) {
        allowHeadersSet.clear();
        for (String header : headers) {
            allowHeadersSet.add(header.toLowerCase());
        }
        allowHeaders = Joiner.on(",").join(headers);
    }
702491
def add_header(self, header):
        """"""
        if type(header) is dict:
            self._headers.update(header)
        else:
            raise ValueError(
                "Dictionary expected, got '%s' instead" % type(header)
            )