From 40c946b58ec6849034f2b118a92be294368d1256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 29 Nov 2021 10:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ClientAbstracts.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ClientAbstracts.php b/src/ClientAbstracts.php index 08006e8..2b04498 100644 --- a/src/ClientAbstracts.php +++ b/src/ClientAbstracts.php @@ -67,6 +67,9 @@ abstract class ClientAbstracts implements IClient */ public function getBody(): string|ResponseInterface|null { + if ($this->body instanceof ResponseInterface) { + return $this->body->getBody()->getContents(); + } return $this->body; }