public function header($header = null, $value = null)
    {
        deprecationWarning(
            'Response::header() is deprecated. ' .
            'Use `withHeader()`, `getHeaderLine()` and `getHeaders()` instead.'
        );

        if ($header === null) {
            return $this->getSimpleHeaders();
        }

        $headers = is_array($header) ? $header : [$header => $value];
        foreach ($headers as $header => $value) {
            if (is_numeric($header)) {
                list($header, $value) = [$value, null];
            }
            if ($value === null) {
                list($header, $value) = explode(':', $header, 2);
            }

            $lower = strtolower($header);
            if (array_key_exists($lower, $this->headerNames)) {
                $header = $this->headerNames[$lower];
            } else {
                $this->headerNames[$lower] = $header;
            }

            $this->headers[$header] = is_array($value) ? array_map('trim', $value) : [trim($value)];
        }

        return $this->getSimpleHeaders();
    }