public function Request::__toString

Same name in this branch

Returns the request as a string.

Return value

string The request

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 396

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function __toString() {
  return sprintf('%s %s %s', $this
    ->getMethod(), $this
    ->getRequestUri(), $this->server
    ->get('SERVER_PROTOCOL')) . "\r\n" . $this->headers . "\r\n" . $this
    ->getContent();
}