Sets the specified HTTP header.
184406
public B setHttpHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        httpHeaders.setObject(HttpHeaderNames.of(name), value);
        return self();
    }
425678
public B setHttpHeaders(Headers<AsciiString, String, ?> httpHeaders) {
        requireNonNull(httpHeaders, "httpHeaders");
        this.httpHeaders.setAll(httpHeaders);
        return self();
    }
528327
public void addHeader(String key, String value) {
    this.headers = addToMap(key, value, this.headers);
  }
190511
function setAcceptHeader(req) {
    var httpRequest = req.httpRequest;
    if (!httpRequest.headers.Accept) {
      httpRequest.headers['Accept'] = 'application/json';
    }
  }
972103
public HttpHubConnectionBuilder withHeader(String name, String value) {
        if (headers == null) {
            this.headers = new HashMap<>();
        }
        this.headers.put(name, value);
        return this;
    }
240160
public function header($key, $value=null,$http_response_code=null) {
        if($value) {
            $key = $key.':'.$value;
        }
        headers_sent() or header($key,true,$http_response_code);
    }
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;
    }
1245330
public void addRequestHttpHeader(Map<String, String> httpHeader) {

        if (this.requestHttpHeaders == null)
            this.requestHttpHeaders = new HashMap<>();

        this.requestHttpHeaders.putAll(httpHeader);
    }
993799
public static void setSlugHeader(HttpHeaders headers, String value) {
    if (value == null) {
      headers.remove("Slug");
    } else {
      headers.set("Slug", Lists.newArrayList(Arrays.asList(SLUG_ESCAPER.escape(value))));
    }
  }
500438
def __SetBaseHeaders(self, http_request, client):
        """"""
        # TODO(craigcitro): Make the default a little better here, and
        # include the apitools version.
        user_agent = client.user_agent or 'apitools-client/1.0'
        http_request.headers['user-agent'] = user_agent
        http_request.headers['accept'] = 'application/json'
        http_request.headers['accept-encoding'] = 'gzip, deflate'
531624
@Override
	public void setIntHeader(final String name, final int value) {
		headers.put(name, String.valueOf(value));
	}
624373
public HttpFileServiceBuilder setHeaders(Headers<AsciiString, String, ?> headers) {
        requireNonNull(headers, "headers");
        if (!headers.isEmpty()) {
            getOrCreateHeaders().setAll(headers);
        }
        return this;
    }
754555
public final B setHeaders(Headers<AsciiString, String, ?> headers) {
        requireNonNull(headers, "headers");
        if (!headers.isEmpty()) {
            getOrCreateHeaders().setAll(headers);
        }
        return self();
    }
1241941
public T header(String name, String value) {
        connection.setRequestProperty(name, value);
        return (T) this;
    }
1035048
public function setHeader($key, $value, $http_response_code = null)
    {
        header($key.': '.$value, null, $http_response_code);
    }
327189
public void setHeader(String header) {
        headerLabel.getElement().setInnerSafeHtml(SafeHtmlUtils.fromString(header));
        addStyleName(CssName.WITH_HEADER);
        ListItem item = new ListItem(headerLabel);
        UiHelper.addMousePressedHandlers(item);
        item.setStyleName(CssName.COLLECTION_HEADER);
        insert(item, 0);
    }
657433
def set_header(self, name, format, *args):
        
        return lib.zyre_set_header(self._as_parameter_, name, format, *args)