Sets a header. If this header was already set, the value is overridden.

@param headerName    the header name
@param headerContent the header value
@return the current result.
970084
public Result with(String headerName, String headerContent) {
        headers.put(headerName, headerContent);
        return this;
    }
1309583
@Override
	public void setDateHeader(final String name, final long value) {
		headers.put(name, String.valueOf(value));
	}
296064
@JsonIgnore
    public void encodeAndSetContent(byte[] byteContent) {

        if (byteContent == null) {
            this.content = null;
            return;
        }

        this.content = Base64.getEncoder().encodeToString(byteContent);
        encoding = "base64";
    }
916819
@Override
	public void setHeader(final String name, final String value) {
		LOG.debug("Setting header, " + name + '=' + value);
		headers.put(name, 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);
    }
1200028
public final void setContent(byte[] content)
    {
        //clear non relevant flags
        this.contentString=null;
        this.contentParts=null;
        this.contentType=ContentType.BINARY;

        if(content==null)
        {
            this.contentBinary=null;
        }
        else
        {
            this.contentBinary=content.clone();
        }
    }
697905
public void setDateHeader (@Nonnull @Nonempty final String sName, @Nonnull final ZonedDateTime aDT)
  {
    _setHeader (sName, getDateTimeAsString (aDT));
  }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
374495
public TrailingHeaders setHeader(CharSequence name, Object value) {
        lastHttpContent.trailingHeaders().set(name, value);
        return this;
    }
373142
@SuppressWarnings("unchecked")
	public T addHeader(final String name, final String value) {
		List<String> values = new ArrayList<String>();
		values.add(value);

		this.headers.put(name, values);
		return (T) this;
	}
1119478
public boolean addHeader(String name, String content) {
        try {
            return add(new Header(name, content));
		} catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
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;
    }
1075617
public String getHeader(String name)
    {
        HeaderField f = getHeaderField(name);
        if (f != null)
        {
            return f.getStringValue();
        }
        else
        {
            return null;
        }
    }
1200677
public void setLongHeader (@Nonnull @Nonempty final String sName, final long nValue)
  {
    _setHeader (sName, Long.toString (nValue));
  }
935151
public OpenAPIConnection header(String headerName, String headerValue) {
        this.headers.put(headerName, headerValue);
        return this;
    }
389512
private void setContentType(String contentType) {
        // The content type may contain the charset, parse it and set it.
        if (contentType != null && contentType.contains("charset=")) {
            charset = Charset.forName(contentType.substring(contentType.indexOf("charset=") + 8).trim());
        }
        headers.put(HeaderNames.CONTENT_TYPE, contentType);
    }
1374231
@Nullable
  public String getHeader (@Nullable final String sName)
  {
    final ICommonsOrderedSet <String> aSet = m_aHeaders.get (_unifyHeaderName (sName));
    return aSet == null ? null : aSet.getFirst ();
  }