public function EntityEnclosingRequest::__toString

Get the HTTP request as a string

Return value

string

Overrides Request::__toString

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php, line 51

Class

EntityEnclosingRequest
HTTP request that sends an entity-body in the request message (POST, PUT, PATCH, DELETE)

Namespace

Guzzle\Http\Message

Code

public function __toString() {

  // Only attempt to include the POST data if it's only fields
  if (count($this->postFields) && empty($this->postFiles)) {
    return parent::__toString() . (string) $this->postFields;
  }
  return parent::__toString() . $this->body;
}