Appends header.

 @param [#to_s] name header name
 @param [Array<#to_s>, #to_s] value header value(s) to be appended
 @return [void]
553486
def add(name, value)
      name = normalize_header name.to_s
      Array(value).each { |v| @pile << [name, validate_value(v)] }
    end
1368253
protected function addHeader($name, $value)
    {
        $this->baseload['headers'] = array_merge($this->baseload['headers'], [$name => $value]);
    }
417717
def set_header(self, name, value, append=False):
        '''  '''
        if append:
            self.add_header(name, value)
        else:
            self._headers[_hkey(name)] = [str(value)]
28594
public function addHeader(string $name, string $value): bool
    {

        /* Initialize the return value */
        $isSet = false;

        /* If the given parameters aren't empty */
        if (!empty($name) && !empty($value)) {

            /* Assign the values */
            $this->offsetSet($name, $value);
            $isSet = true;
        }

        return $isSet;
    }
975624
def set_header(self, name: str, value: _HeaderTypes) -> None:
        
        self._headers[name] = self._convert_header_value(value)
1166110
public function addOptionalHeader($name, $value)
    {
        Validate::isString($name, 'name');
        Validate::isString($value, 'value');

        if (!empty($value)) {
            $this->_headers[$name] = $value;
        }
    }
388343
def []=(name, value)
      if name.to_s == 'body'
        self.body = value
      elsif name.to_s =~ /content[-_]type/i
        header[name] = value
      elsif name.to_s == 'charset'
        self.charset = value
      else
        header[name] = value
      end
    end
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;
    }
960657
public function addHeader($name, $value = null) {
        if ($this->canSetHeaders()) {
            if ($value === null) {
                $value = trim(substr($name, strpos($name, ':') + 1));
                $name = trim(substr($name, 0, strpos($name, ':')));
            }

            $this->headers[$name] = $value;
        }
    }
1080829
public T header(String name, Object value) {
        getMessageContentBuilder().getMessageHeaders().put(name, value);
        return self;
    }
901741
public void setHeader(String name, String value) {
//		int pos = 0;
//		int crlfpos = 0;
        Pattern pattern = null;

        if (getHeaders(name) == null && value != null) {
            // header value not found, append to end
            addHeader(name, value);
        } else {
            pattern = getHeaderRegex(name);
            Matcher matcher = pattern.matcher(mMsgHeader);
            if (value == null) {
                // delete header
                mMsgHeader = matcher.replaceAll("");
            } else {
                // replace header
                String newString = name + ": " + value + mLineDelimiter;
                mMsgHeader = matcher.replaceAll(Matcher.quoteReplacement(newString));
            }

            // set into hashtable
            replaceInternalHeaderFields(name, value);
        }
    }
752065
public WebSocket addHeader(String name, String value)
    {
        mHandshakeBuilder.addHeader(name, value);

        return this;
    }
1148472
public function withAddedHeader($header, $value)
    {
        // Follow a different procedure if the given header isn't set yet at all.
        if (!$this->hasHeader($header)) {
            return $this->withHeader($header, $value);
        }

        // Normalize the header name.
        $name   = strtolower($header);
        $header = $this->headerNames[$name];

        // Create a clone and append the value to the specified header's values.
        $new = clone $this;
        $new->headers[$header] = array_merge($this->headers[$header], (array) $value);

        return $new;
    }
496018
function(name, value) {
    var regexp, idx;

    // Remove the header from extraHeaders if present.
    regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
    for (idx=0; idx<this.extraHeaders.length; idx++) {
      if (regexp.test(this.extraHeaders[idx])) {
        this.extraHeaders.splice(idx, 1);
      }
    }

    this.headers[Utils.headerize(name)] = (Array.isArray(value)) ? value : [value];
  }
237495
def []=(name, value)
      @column_keys << name
      @attrs[to_key(name)] = value
      define_accessor(name) unless respond_to?(name)
    end
382116
function append(name, value) {
    validateArgumentsLength(arguments.length, 2);
    var state = getInternalParamsState(this);
    state.entries.push({ key: name + '', value: value + '' });
    if (state.updateURL) state.updateURL();
  }
582519
public void addHeader( String name, String value )
    {
        headers.add( new BasicHeader( name, value ) );
    }