Sets the header named {@code name} to {@code value}. If this request already has any headers
with that name, they are all replaced.
977323
public OkHttpRequest header(String name, String value) {
        builder.header(name, value);
        return this;
    }
1162893
public RequestBuilder<T,ID> addHeader(String name,String value)
    {
        headers.add(name, value);
        return this;
    }
931966
public OkRequest<T> header(final String name, final String value) {
        mRequestHeaders.put(name, value);
        return this;
    }
1030226
public TrailingHeaders addHeader(CharSequence name, Object value) {
        lastHttpContent.trailingHeaders().add(name, value);
        return this;
    }
896065
public void setIntHeader (@Nonnull @Nonempty final String sName, final int nValue)
  {
    _setHeader (sName, Integer.toString (nValue));
  }
528327
public void addHeader(String key, String value) {
    this.headers = addToMap(key, value, this.headers);
  }
1336000
public Response header(String name, String value) {
        checkCommitted();

        getHeaderMap().put(name, value);

        return this;
    }
692581
public HeaderParams put(String name, String value) {
        values.put(cleanAndValidate(name), cleanAndValidate(value));
        return this;
    }
1350733
@Override
    public void setRequestHeader(Header header) {
        
        Header[] headers = getRequestHeaderGroup().getHeaders(header.getName());
        
        for (int i = 0; i < headers.length; i++) {
            getRequestHeaderGroup().removeHeader(headers[i]);
        }
        
        getRequestHeaderGroup().addHeader(header);
        
    }
1200677
public void setLongHeader (@Nonnull @Nonempty final String sName, final long nValue)
  {
    _setHeader (sName, Long.toString (nValue));
  }
335077
public void setHeader(String name, String value) {
	headers = ReqRspUtil.set(headers, name, value);
    }
172412
public T header(String name, String value) {
        Collection<String> l = headers.get(name);
        if (l == null) {
            l = new ArrayList<String>();
        }
        l.add(value);
        headers.put(name, l);
        return derived.cast(this);
    }
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);
        }
    }
1054372
public void setCustomHeader(String[] header) {
        if (header == null) {
            throw new IllegalArgumentException("Custom header can't be null.");
        }
        customHeader = new CustomHeaderLine[header.length];
        for (int i = 0; i < header.length; i++) {
            customHeader[i] = new CustomHeaderLine(header[i]);
        }
    }
1031341
def set_header(self, name, value):
        '''  '''
        self._headers[_hkey(name)] = [str(value)]
1081572
def set_header(self, name, value):
        
        self._headers[_hkey(name)] = [_hval(value)]
76884
public void addHeader(String name, boolean required, Object value) {
        RemotingHeader header = new RemotingHeader(name, required, value);
        headers.put(name, header);
    }