Any additional headers you would like included with the GET request sent to
your server. Ignored in IE9 and IE8 if the endpoint is cross-origin.

@param aCustomHeaders
Custom headers to be added.
@return this
484836
@Nonnull
  public FineUploader5Session addCustomHeaders (@Nullable final Map <String, String> aCustomHeaders)
  {
    m_aSessionCustomHeaders.addAll (aCustomHeaders);
    return this;
  }
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;
    }
1060198
protected function addServiceConfigurationToHead()
    {
        // Add pz2urlrecipe.js to <head> if URL recipes are to be used.
        $scriptTag = new TagBuilder('script');
        $scriptTag->addAttribute('type', 'text/javascript');
        $scriptTag->addAttribute('src', $this->conf['pz2urlrecipeJSPath']);
        $scriptTag->forceClosingTag(true);
        $this->response->addAdditionalHeaderData($scriptTag->render());

        // Add Service Proxy configuration to <head> before pz2.js is included.
        $jsVariables = [
                'useServiceProxy' => 'true',
                'serviceProxyAuthPath' => json_encode($this->conf['serviceProxyAuthPath']),
                'pazpar2Path' => json_encode($this->conf['serviceProxyPath'])
        ];

        $jsCommand = "\n";
        foreach ($jsVariables as $name => $value) {
            $jsCommand .= $name . ' = ' . $value . ";\n";
        }

        $scriptTag = new TagBuilder('script');
        $scriptTag->addAttribute('type', 'text/javascript');
        $scriptTag->setContent($jsCommand);
        $this->response->addAdditionalHeaderData($scriptTag->render());
    }
1333244
protected HttpHeaders copy(HttpHeaders headers){
		HttpHeaders newHeaders = new HttpHeaders();
		newHeaders.putAll(headers);
		return newHeaders;
	}
1328846
private void addHeadersToContext(final HttpHeaders headers) {
        for (HttpHeader header : headers.all()) {
            final String rawKey = header.key();
            final String transformedKey = rawKey.replaceAll("-", "");
            context.put("requestHeader".concat(transformedKey), header.values()
                    .toString());
        }
    }
586377
public Response andHeaders(Map<HttpString, String> headers) {
        Objects.requireNonNull(headers, Required.HEADERS.toString());
        this.headers.putAll(headers);

        return this;
    }
776382
public T header(Map<String, List<String>> headers) {
		return header(headers, false);
	}
902089
public void setDefaultHeaders(Collection<? extends Header> defaultHeaders) {
        Collection<BasicHeader> copiedHeaders = new HashSet<>();
        for (Header header : defaultHeaders) {
            copiedHeaders.add(new BasicHeader(header.getName(), header.getValue()));
        }
        this.defaultHeaders = copiedHeaders;
    }
288688
public void addResponseHeaders(final HttpServletResponse servletResponse) {

        final String receivedParam = ofNullable(params.get("received")).orElse("");
        final List<String> includes = asList(ofNullable(params.get("include")).orElse(" ").split(" "));
        final List<String> omits = asList(ofNullable(params.get("omit")).orElse(" ").split(" "));

        final StringBuilder includeBuilder = new StringBuilder();
        final StringBuilder omitBuilder = new StringBuilder();

        if (!(value.equals("minimal") || receivedParam.equals("minimal"))) {
            final List<String> appliedPrefs = asList(PREFER_SERVER_MANAGED.toString(),
                    LDP_NAMESPACE + "PreferMinimalContainer",
                    LDP_NAMESPACE + "PreferMembership",
                    LDP_NAMESPACE + "PreferContainment");
            final List<String> includePrefs = asList(EMBED_CONTAINED.toString(),
                    INBOUND_REFERENCES.toString());
            includes.forEach(param -> includeBuilder.append(
                    (appliedPrefs.contains(param) || includePrefs.contains(param)) ? param + " " : ""));

            // Note: include params prioritized over omits during implementation
            omits.forEach(param -> omitBuilder.append(
                    (appliedPrefs.contains(param) && !includes.contains(param)) ? param + " " : ""));
        }

        // build the header for Preference Applied
        final String appliedReturn = value.equals("minimal") ? "return=minimal" : "return=representation";
        final String appliedReceived = receivedParam.equals("minimal") ? "received=minimal" : "";

        final StringBuilder preferenceAppliedBuilder = new StringBuilder(appliedReturn);
        preferenceAppliedBuilder.append(appliedReceived.length() > 0 ? "; " + appliedReceived : "");
        appendHeaderParam(preferenceAppliedBuilder, "include", includeBuilder.toString().trim());
        appendHeaderParam(preferenceAppliedBuilder, "omit", omitBuilder.toString().trim());

        servletResponse.addHeader("Preference-Applied", preferenceAppliedBuilder.toString().trim());

        servletResponse.addHeader("Vary", "Prefer");
    }
277575
@SuppressWarnings("unchecked") /* See constructor comments. */
  public void setHttpHeaders(Object soapClient, AdManagerSession adManagerSession) {
    Map<String, String> headersMap = Maps.newHashMap();
    soapClientHandler.putAllHttpHeaders(soapClient, headersMap);
  }
156872
private function addHeadersForOptionsRequests()
    {
        // header for preflight cache expiry
        $maxAge = self::MAX_AGE;
        if (isset($this->options[self::HEADER_MAX_AGE])) {
            $maxAge = intval($this->options[self::HEADER_MAX_AGE]);
        }
        @header(self::HEADER_MAX_AGE.': '.$maxAge);

        // header for allowed request headers in cross origin requests
        $allowedHeaders = self::$allowedHeaders;
        if (isset($this->options[self::HEADER_ALLOW_HEADERS])) {
            $allowedHeaders = (array)$this->options[self::HEADER_ALLOW_HEADERS];
        }
        @header(self::HEADER_ALLOW_HEADERS.':'.implode(',', $allowedHeaders));

        // header for allowed HTTP methods in cross orgin requests
        $allowedMethods = self::$allowedMethods;
        if (isset($this->options[self::HEADER_ALLOW_METHODS])) {
            $allowedMethods = (array)$this->options[self::HEADER_ALLOW_METHODS];
        }
        @header(self::HEADER_ALLOW_METHODS.':'.implode(',', $allowedMethods));
    }
1001646
public HttpRequestBuilder addHeader(String name, String value) {
    if (value != null) {
      reqHeaders.put(name, value);
    }
    return this;
  }
313633
public RestBuilder enableCors() {

		Set<String> allowedHeaders = new HashSet<>();
		allowedHeaders.add("Access-Control-Allow-Origin");
		//allowedHeaders.add("Access-Control-Allow-Credentials");
		allowedHeaders.add("Access-Control-Allow-Headers");
		allowedHeaders.add("Access-Control-Allow-Methods");
		allowedHeaders.add("Access-Control-Expose-Headers");
		allowedHeaders.add("Access-Control-Request-Method");
		allowedHeaders.add("Access-Control-Request-Headers");
		//allowedHeaders.add("Access-Control-Max-Age");
		allowedHeaders.add("Origin");
		return enableCors("*", false, -1, allowedHeaders);
	}
773901
protected void addRequestHeaders(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
        for (final Map.Entry<String, Set<String>> headerAttributeEntry : this.headerAttributeMapping.entrySet()) {
            final String headerName = headerAttributeEntry.getKey();
            final String value = httpServletRequest.getHeader(headerName);

            if (value != null) {
                for (final String attributeName : headerAttributeEntry.getValue()) {
                    attributes.put(attributeName,
                            headersToIgnoreSemicolons.contains(headerName) ?
                                    list(value)
                                    : splitOnSemiColonHandlingBackslashEscaping(value));
                }
            }
        }
    }
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;
	}
1003256
@Nonnull
  public FineUploader5DeleteFile setCustomHeaders (@Nullable final Map <String, String> aCustomHeaders)
  {
    m_aDeleteFileCustomHeaders.setAll (aCustomHeaders);
    return this;
  }
97264
@Nonnull
  public FineUploader5DeleteFile addCustomHeaders (@Nullable final Map <String, String> aCustomHeaders)
  {
    m_aDeleteFileCustomHeaders.addAll (aCustomHeaders);
    return this;
  }