src/Request.php
public function toString()
    {
        $request = Parser\RequestParser::buildStatusLine($this) . Http::NEW_LINE;
        $headers = Parser\RequestParser::buildHeaderFromMessage($this);

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

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

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

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

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

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

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