public function toArray()
    {
        $output = [];
        $output[] = sprintf(
            'HTTP/1.1 %s %s',
            $this->statusCode,
            self::codeToReason($this->statusCode)
        );
        foreach ($this->headers as $k => $v) {
            $output[] = sprintf('%s: %s', $k, $v);
        }
        $output[] = '';
        $output[] = $this->body;

        return $output;
    }