public __toString ( ) : string | ||
return | string |
public function __toString()
{
$request = sprintf("%s %s HTTP/1.1\r\n", $this->getMethod(), $this->getUriWithPort());
$request .= $this->getHeadersAsString();
$request .= $this->getBody();
return trim($request);
}