You are here

public function DrupalGatherContentClient::getBody in GatherContent 8.5

Same name and namespace in other branches
  1. 8.4 src/DrupalGatherContentClient.php \Drupal\gathercontent\DrupalGatherContentClient::getBody()

Returns the response body.

Parameters

bool $jsonDecoded: If TRUE the method will return the body json_decoded.

Return value

\Psr\Http\Message\StreamInterface Response body.

File

src/DrupalGatherContentClient.php, line 106

Class

DrupalGatherContentClient
Extends the GatherContentClient class with Drupal specific functionality.

Namespace

Drupal\gathercontent

Code

public function getBody($jsonDecoded = FALSE) {
  $body = $this
    ->getResponse()
    ->getBody();
  if ($jsonDecoded) {
    return json_decode($body);
  }
  return $body;
}