From 6772406fcd50a3f9d25d1b7e2e062793c44b8e54 Mon Sep 17 00:00:00 2001
From: Piotr Potrebka <piotr.potrebka@wpdesk.net>
Date: Mon, 7 Oct 2024 14:21:53 +0200
Subject: [PATCH] fix: body response

---
 changelog.txt           | 3 +++
 src/Curl/CurlClient.php | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changelog.txt b/changelog.txt
index bac951e..3e87b0d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,6 @@
+= 1.0.5 - 2024-10-07 =
+* Fixed body response
+
 = 1.0.4 - 2020-12-09 =
 * Fixed issue with body
 
diff --git a/src/Curl/CurlClient.php b/src/Curl/CurlClient.php
index ace0598..6495d85 100644
--- a/src/Curl/CurlClient.php
+++ b/src/Curl/CurlClient.php
@@ -155,8 +155,8 @@ class CurlClient implements HttpClient {
 	 * @return array
 	 */
 	private function extractResponseHeadersAndBody() {
-		$rawBody    = \trim( $this->rawResponse );
-		$rawHeaders = \trim( implode( "\r\n", $this->headers ) );
+		$rawBody    = $this->rawResponse;
+		$rawHeaders = implode( "\r\n", $this->headers );
 
 		return [ $rawHeaders, $rawBody ];
 	}
-- 
GitLab