lithium\net\http\Response::__toString PHP Method

__toString() public method

Return the response as a string.
public __toString ( ) : string
return string
    public function __toString()
    {
        if ($type = $this->headers('Content-Type')) {
            $this->headers('Content-Type', "{$type};charset={$this->encoding}");
        }
        if ($cookies = $this->_cookies()) {
            $this->headers('Set-Cookie', $cookies);
        }
        $body = join("\r\n", (array) $this->body);
        $headers = join("\r\n", $this->headers());
        $response = array($this->status(), $headers, "", $body);
        return join("\r\n", $response);
    }