public function EntityEnclosingRequestInterface::setBody

Set the body of the request

Parameters

string|resource|EntityBodyInterface $body Body to use in the entity body of the request:

string $contentType Content-Type to set. Leave null to use an existing: Content-Type or to guess the Content-Type

bool $tryChunkedTransfer Try to use chunked Transfer-Encoding:

Return value

EntityEnclosingRequestInterface

Throws

RequestException if the protocol is < 1.1 and Content-Length can not be determined

1 method overrides EntityEnclosingRequestInterface::setBody()
EntityEnclosingRequest::setBody in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php
Set the body of the request

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequestInterface.php, line 28

Class

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

Namespace

Guzzle\Http\Message

Code

public function setBody($body, $contentType = null, $tryChunkedTransfer = false);