public function Request::setResponseBody

Set the EntityBody that will hold the response message's entity body.

This method should be invoked when you need to send the response's entity body somewhere other than the normal php://temp buffer. For example, you can send the entity body to a socket, file, or some other custom stream.

Parameters

EntityBodyInterface $body Response body object:

Return value

Request

Overrides RequestInterface::setResponseBody

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php, line 545

Class

Request
HTTP request class to send requests

Namespace

Guzzle\Http\Message

Code

public function setResponseBody(EntityBodyInterface $body) {
  $this->responseBody = $body;
  return $this;
}