diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 808520b5ccb5a29eb412f8a64411d1ec451a16c3..fb18fe3032ff537f78d4dc130ffb1f047cbffb9d 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1364,8 +1364,8 @@ function install_retrieve_file($uri, $destination) {
   }
 
   try {
-    $request = \Drupal::httpClient()->get($uri, array('headers' => array('Accept' => 'text/plain')));
-    $data = $request->getBody(TRUE);
+    $response = \Drupal::httpClient()->get($uri, array('headers' => array('Accept' => 'text/plain')));
+    $data = (string) $response->getBody();
     if (empty($data)) {
       return FALSE;
     }
diff --git a/core/modules/aggregator/src/Form/OpmlFeedAdd.php b/core/modules/aggregator/src/Form/OpmlFeedAdd.php
index 93437b1826579f5a647604102483d784c8286b75..357d0dc3fcc5cf700be4c5fa6e452d81a34c379f 100644
--- a/core/modules/aggregator/src/Form/OpmlFeedAdd.php
+++ b/core/modules/aggregator/src/Form/OpmlFeedAdd.php
@@ -122,7 +122,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       // @todo Move this to a fetcher implementation.
       try {
         $response = $this->httpClient->get($form_state->getValue('remote'));
-        $data = $response->getBody(TRUE);
+        $data = (string) $response->getBody();
       }
       catch (RequestException $e) {
         $this->logger('aggregator')->warning('Failed to download OPML file due to "%error".', array('%error' => $e->getMessage()));
diff --git a/core/modules/hal/src/Normalizer/FileEntityNormalizer.php b/core/modules/hal/src/Normalizer/FileEntityNormalizer.php
index f993024f60600e45aba48ce48ed3220cfeab876e..52ee04b76839fcbf0b335b3ff767e00ce3096674 100644
--- a/core/modules/hal/src/Normalizer/FileEntityNormalizer.php
+++ b/core/modules/hal/src/Normalizer/FileEntityNormalizer.php
@@ -64,7 +64,7 @@ public function normalize($entity, $format = NULL, array $context = array()) {
    * {@inheritdoc}
    */
   public function denormalize($data, $class, $format = NULL, array $context = array()) {
-    $file_data = $this->httpClient->get($data['uri'][0]['value'])->getBody(TRUE);
+    $file_data = (string) $this->httpClient->get($data['uri'][0]['value'])->getBody();
 
     $path = 'temporary://' . drupal_basename($data['uri'][0]['value']);
     $data['uri'] = file_unmanaged_save_data($file_data, $path);
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 415dc977f6c3ed8052052245a8cbc310e179428c..ec71f2b97d47ea1182828d326f760496e4784317 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -1361,9 +1361,9 @@ function system_retrieve_file($url, $destination = NULL, $managed = FALSE, $repl
     }
   }
   try {
-    $data = \Drupal::httpClient()
+    $data = (string) \Drupal::httpClient()
       ->get($url)
-      ->getBody(TRUE);
+      ->getBody();
     $local = $managed ? file_save_data($data, $path, $replace) : file_unmanaged_save_data($data, $path, $replace);
   }
   catch (RequestException $exception) {