Expand the given header with the default header
507066
def expand_header(header = {})
      header = DEFAULT_HEADER.merge(header)
      header['X-ITRP-Account'] = option(:account) if option(:account)
      header['AUTHORIZATION'] = 'Basic ' + ["#{option(:api_token)}:x"].pack('m*').gsub(/\s/, '')
      if option(:source)
        header['X-ITRP-Source'] = option(:source)
        header['HTTP_USER_AGENT'] = option(:source)
      end
      header
    end
178942
def _SetHeader(self, values):
    """"""
    if self._values and len(values) != len(self._values):
      raise ValueError('Header values not equal to existing data width.')
    if not self._values:
      for _ in range(len(values)):
        self._values.append(None)
    self._keys = list(values)
    self._BuildIndex()
676975
def add_header(self, name, value):
        '''
        '''
        if self.headers is None:
            self.headers = []
        self.headers.append(dict(Name=name, Value=value))
768622
private Header newHeader(AsciiString name){
        Header header = new Header(name);
        if(first==null)
            first = header;
        else{
            header.prev = first.prev;
            first.prev.next = header;
            first.prev = header;
        }
        return header;
    }
676816
def set_header(self, key, value):
    
    self.conn.issue_command("Header", _normalize_header(key), value)
1081572
def set_header(self, name, value):
        
        self._headers[_hkey(name)] = [_hval(value)]
657433
def set_header(self, name, format, *args):
        
        return lib.zyre_set_header(self._as_parameter_, name, format, *args)
594856
function formatUsageHeader(headerContent) {
  var headerString =  headerContent instanceof Array ?
    headerContent.join(EOL) :
    headerContent;

  return headerString + EOL;
}
613968
public void addAllowedHeader(String header) {

		Constraint.ensureNotEmpty(header, String.format("Invalid header '%s'", header));
		allowedHeaders.add(header.toLowerCase());
	}
1282495
def with_headers(self, headers):
        
        for key, value in headers.items():
            self.with_header(key, value)
        return self
982242
def get_header(headers, name, default=None):
    
    name = name.lower()
    for header in headers:
        if header[0].lower() == name:
            return header[1]
    return default
1167263
def addOutHeaderInfo(self, name, type, namespace, element_type=0,
                         mustUnderstand=0):
        """"""
        headerinfo = HeaderInfo(name, type, namespace, element_type)
        if mustUnderstand:
            headerinfo.mustUnderstand = 1
        self.outheaders.append(headerinfo)
        return headerinfo
796413
public static void addDefaultHeader(String key, String value) {
		if (isNotBlank(key) && isNotBlank(value)) {
			if (defaultHeader == null) {
				defaultHeader = new HashMap<String, String>();
			}
			defaultHeader.put(key, value);
		}
	}
528327
public void addHeader(String key, String value) {
    this.headers = addToMap(key, value, this.headers);
  }
835463
public function addHeader($header)
	{
		if(is_string($header)) $header = HeaderField::fromString($header);
		$this->_headers[] = $header;
		return $this;
	}
417717
def set_header(self, name, value, append=False):
        '''  '''
        if append:
            self.add_header(name, value)
        else:
            self._headers[_hkey(name)] = [str(value)]
890793
def addInHeaderInfo(self, name, type, namespace, element_type=0,
                        mustUnderstand=0):
        """"""
        headerinfo = HeaderInfo(name, type, namespace, element_type)
        if mustUnderstand:
            headerinfo.mustUnderstand = 1
        self.inheaders.append(headerinfo)
        return headerinfo