src/Response.php
public function toString()
    {
        $response = Parser\ResponseParser::buildStatusLine($this) . Http::NEW_LINE;
        $headers  = Parser\ResponseParser::buildHeaderFromMessage($this);

        foreach ($headers as $header) {
            $response.= $header . Http::NEW_LINE;
        }

        $response.= Http::NEW_LINE;
        $response.= (string) $this->getBody();

        return $response;
    }
public function toString()
    {
        $response = Parser\ResponseParser::buildStatusLine($this) . Http::NEW_LINE;
        $headers  = Parser\ResponseParser::buildHeaderFromMessage($this);

        foreach ($headers as $header) {
            $response.= $header . Http::NEW_LINE;
        }

        $response.= Http::NEW_LINE;
        $response.= (string) $this->getBody();

        return $response;
    }
public function toString ( ) { $ response = Parser \ ResponseParser :: buildStatusLine ( $ this ) . Http :: NEW_LINE ; $ headers = Parser \ ResponseParser :: buildHeaderFromMessage ( $ this ) ; foreach ( $ headers as $ header ) { $ response .= $ header . Http :: NEW_LINE ; } $ response .= Http :: NEW_LINE ; $ response .= ( string ) $ this -> getBody ( ) ; return $ response ; }
Converts the response object to an http response string

@return string
Converts the response object to an http response string