Forms header from host.

@return array
970795
public function getHeader()
    {
        if (is_null($this->header)) {
            $host = $this->getHost();

            $header = array();
            $header[] = 'POST /cgi-bin/webscr HTTP/1.1';
            $header[] = 'Content-Type: application/x-www-form-urlencoded';
            if (isset($host)) {
                $header[] = 'Host: ' . $host;
            }
            $header[] = 'Connection: close';

            $this->setHeader($header);
        }

        return $this->header;
    }
763477
public function getHeaderLines()
    {
        $headers = [];
        foreach ($this->headers->getIterator() as $name => $value) {
            $headers[] = $name . ': ' . $value;
        }

        return $headers;
    }
256582
public function getHeaders(): array
    {
        if ($this->headers === null && $this->headersText !== null) {
            $this->headers = [];

            foreach (explode("\n", $this->headersText) as $line) {
                $pos = strpos($line, ':');

                if ($pos === false) {
                    // this is one-line header
                    $this->headers[$line] = null;
                } else {
                    $name = substr($line, 0, $pos);
                    $value = substr($line, $pos + 1);
                    $this->headers[$name] = trim($value);
                }
            }
        }

        return $this->headers ?? [];
    }
623315
public function getHttpHeaders()
    {
        if ($this->headers === null) {
            $this->headers = new SimpleHeaders();
            $this->headers->setContentType('application/excel', 'utf-8');
            $this->headers->setContentDispositionType(SimpleHeaders::DIPOSITION_ATTACHEMENT);
        }

        return $this->headers;
    }
370718
public static function getRequestHeaders()
    {
        if (function_exists('getallheaders')) {
            $headers = array();
            foreach (getallheaders() as $name => $value) {
                $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $name))))] = $value;
            }
            return $headers;
        }
        $headers = array();
        foreach ($_SERVER as $name => $value) {
            if (substr($name, 0, 5) == 'HTTP_') {
                $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
            }
        }
        return $headers;
    }
1177699
public function getHeaders() {
		$headers = array();
		foreach ($this->headers as $name => $values) {
			foreach ($values as $value) {
				$headers[] = strtolower($name) . ': ' . $value;
			}
		}
		$headers[] = self::HEADER_KEY_CONTENT_LENGTH . ': ' . strlen($this->getBody());
		return $headers;
	}
1327251
public function getHeader(): array
    {
        if (null === $this->header_offset) {
            return $this->header;
        }

        if ([] !== $this->header) {
            return $this->header;
        }

        $this->header = $this->setHeader($this->header_offset);

        return $this->header;
    }
82776
public function getHeaders()
    {
        switch ($this->request->ext) {
            case 'jpg':
            case 'jpeg':
                $this->response->headerController->headerField('Content-Type', 'image/jpeg');
                break;
            case 'png':
                $this->response->headerController->headerField('Content-Type', 'image/png');
                break;
            case 'gif':
                $this->response->headerController->headerField('Content-Type', 'image/gif');
                break;
        }
    }
942610
protected function getDefaultHeaders()
    {
        $headers = array();

        $mimeType = $this->calendar->getContentType();
        $headers['Content-Type'] = sprintf('%s; charset=utf-8', $mimeType);

        $filename = $this->calendar->getFilename();
        $headers['Content-Disposition'] = sprintf('attachment; filename="%s', $filename);

        return $headers;
    }
505895
protected function getSimpleHeaders()
    {
        $out = [];
        foreach ($this->headers as $key => $values) {
            $header = $this->headerNames[strtolower($key)];
            if (count($values) === 1) {
                $values = $values[0];
            }
            $out[$header] = $values;
        }

        return $out;
    }
550695
public function getHeaders()
    {
        $headers = static::getDefaultHeaders();

        if ($this->eTag) {
            $headers['If-None-Match'] = $this->eTag;
        }

        return array_merge($this->headers, $headers);
    }
260108
private function getHeaders()
    {
        $result = [];
        foreach ($this->headers as $name => $value) {
            $result[] = sprintf("%s: %s", $name, $value);
        }

        return $result;
    }
231921
public function getResponseHeaders()
    {
        if ($this->offsetExists('headers') && is_array($this->headers)) {
            $headers = $this->headers;
        } else {
            $headers = [];
        }
        if (!array_key_exists('X-UA-Compatible', $headers)) {
            $headers['X-UA-Compatible'] = 'IE=edge,chrome=1';
        }

        // Remove null/empty values, this allow you to remove the X-UA-Compatible by making it empty.
        return array_filter($headers);
    }
468888
private function filterHeaders()
    {
        $headers = array();

        foreach ($this->headers as $name => $value) {
            if (strtolower($name) != 'user-agent') {
                $headers[] = "$name: $value";
            }
        }

        return $headers;
    }
842960
public function getHeaders()
    {
        $result = [];

        foreach ($this->shadow as $reference => $index) {
            $result[$index] = $this->headers[$reference];
        }

        return $result;
    }
1213441
protected function getHeaders()
    {
        return [
            'X-RateLimit-Limit' => $this->handler->getThrottleLimit(),
            'X-RateLimit-Remaining' => $this->handler->getRemainingLimit(),
            'X-RateLimit-Reset' => $this->handler->getRateLimitReset(),
        ];
    }
88239
protected function getHttpHeaders()
    {
        $headers = [];
        if (null !== $this->_maxage) {
            $headers['Cache-Control'] = 'max-age=' . $this->_maxage;
        }
        if ($this->_gzipped) {
            $headers['Content-Encoding'] = 'gzip';
        }

        return $headers;
    }