Set headers other than the simple ones that might be exposed to user agent.

@param array $headers

@return Settings
968593
public function setExposedHeaders(array $headers): self
    {
        // Optional: from #7.1.1 'simple response headers' will be available in any case so it does not
        // make sense to include those headers to exposed.
        $filtered = [];
        foreach ($headers as $header) {
            if (\in_array(\strtolower($header), static::SIMPLE_LC_RESPONSE_HEADERS) === false) {
                $filtered[] = $header;
            }
        }

        $this->exposedHeadersList = \implode(', ', $filtered);

        return $this;
    }
980499
public function addHeaders(array $headers)
    {

        foreach ($headers as $key => $value) {
            $header = NULL;
            //Handle Array of String based Headers
            if (is_numeric($key) && strpos($value,":") !== FALSE) {
                $arr = explode(":",$value,2);
                if (count($arr)==2){
                    $header = $arr[0];
                    $value = trim($arr[1]);
                }
            } else {
                $header = $key;
            }
            if ($header !== NULL){
                $this->addHeader($header, $value);
            }
        }
        return $this;
    }
353982
public function header(array $headers) {

        $formattedHeaders = [];

        $combinedHeaders = array_change_key_case(array_merge($this->header, $headers));

        foreach ($combinedHeaders as $key => $val)

            $formattedHeaders[] = trim(strtolower($key)) . ':' . $val;

        $this->header = $formattedHeaders;

        return $this;

    }
57089
protected function unsetHeaders(Array $headers = []) {
    foreach ($headers as $property) {
      $this->client->unsetHeader($property);
    }
  }
616784
public function setHeader(array $header)
    {
        if (is_numeric(key($header))) {
            $header = array_fill_keys($header, '');
        }
        $this->header = $header;

        return $this;
    }
256079
public function setHeaders($headers) {
    $this->allHeaders = array();

    foreach ($headers as $name => $value) {
      if (strpos($name, Container::METADATA_HEADER_PREFIX) !== 0) {
        $this->allHeaders[$name] = $value;
      }
    }

    return $this;
  }
1340811
public function setAccessControlExposeHeaders($headers)
    {
        // If hraders is array, parse to string.
        if (is_array($headers)) {
            $headers = implode(', ', $headers);
        }

        // The headers not is empty, append response hraders.
        if (!empty($headers)) {
            $this->setHeader('Access-Control-Expose-Headers', (string) $headers);
        }

        return $this;
    }
1182849
protected function mapHeaders(array $headers)
    {
        $mappedHeaders = array();
        foreach ($headers as $headerPair) {
            list($name, $value) = $headerPair;
            $mappedHeaders[strtolower($name)] = $value;
        }

        return $mappedHeaders;
    }
241533
public function setHeader($headers = [])
    {
        $this->headers = $headers;
        $this->debug->info(__FUNCTION__, 'setHeaders: ', $this->headers);

        return $this;
    }
269020
public function setHeaders($headers)
    {
        $_headers = [];

        if (is_array($headers)) {
            $_headers = $headers;
        } elseif ($headers instanceof Traversable) {
            $_headers = iterator_to_array($headers);
        } else {
            $type = is_object($headers)
                ? get_class($headers) . " object"
                : "scalar " . gettype($headers);

            throw new PropertiesException ("Headers should be array or iterable, {$type} given instead");
        }

        $this->properties['headers'] = $_headers;
    }
277624
public function setHeaders(array $headers)
    {
        $headers = array_values($headers);
        if (!empty($headers) && !is_array($headers[0])) {
            $headers = array($headers);
        }

        $this->headersCopy = $headers;

        return parent::setHeaders($headers);
    }
110987
public function appendHeaders(array $headers = [])
    {
        // Append headers.
        $this->headers = collect($this->headers)->merge($headers)->all();

        // Return calling object.
        return $this;
    }
177673
private function normalizeRequestHeaders(array $headers)
    {
        // Explicitly set an empty Expect header, so that the server will not
        // respond with a "100 Continue" status code for large uploads.
        $emptyExpectHeader = 'Expect: ';
        $haveExpectHeader = false;

        for ($i = 0; $i < count($headers); $i++) {
            if ($this->isExpectHeader($headers[$i])) {
                // There is already an expect header - let's set it to empty
                $headers[$i] = $emptyExpectHeader;
                $haveExpectHeader = true;
                break;
            }
        }

        if (!$haveExpectHeader) {
            // There is no expect header - let's add one
            $headers[] = $emptyExpectHeader;
        }

        return $headers;
    }
1274629
public function setHeaders($headers)
    {
        $headerCollection = $this->getHeaderCollection();
        $headerCollection->removeAll();
        $headerCollection->fromArray($headers);
    }
628095
public function generateRawHeaders(array $headers)
    {
        $rawHeaders = array();
        foreach ($headers as $key => $values) {
            if (!is_array($values)) {
                $values = array($values);
            }
            foreach ($values as $value) {
                if ($key !== 0) {
                    $rawHeader =  $key . ': ' . $value;
                } else {
                    $rawHeader = $value;
                }
                foreach (explode("\r\n", $rawHeader) as $singleLineRawHeader) {
                    $rawHeaders[] = $singleLineRawHeader;
                }
            }
        }
        return $rawHeaders;
    }
700222
public function withHeaders($headers)
    {
        if ($headers instanceof HeaderBag) {
            $headers = $headers->all();
        }

        foreach ($headers as $key => $value) {
            $this->headers->set($key, $value);
        }

        return $this;
    }
427704
public function addHeaders(array $headers)
    {
        $this->head = array_merge($this->head, $headers);
        curl_setopt($this->curlHandler, CURLOPT_HTTPHEADER, $this->head);
        return $this;
    }