From d27ed6049ebfa11a61468b32d55b9b26aaf807cc Mon Sep 17 00:00:00 2001 From: Randi Skjerven Date: Mon, 2 Sep 2024 19:35:22 -0400 Subject: [PATCH] added raw format in order to return unformated guzzle response (#349) --- src/Omniphx/Forrest/Client.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Omniphx/Forrest/Client.php b/src/Omniphx/Forrest/Client.php index 684b905..bf5d61b 100644 --- a/src/Omniphx/Forrest/Client.php +++ b/src/Omniphx/Forrest/Client.php @@ -245,6 +245,11 @@ private function handleRequest() $this->assignExceptions($ex); } + // If the format is raw, return the response as is + if($this->options['format'] == 'raw') { + return $response; + } + $formattedResponse = $this->formatter->formatResponse($response); $this->event->fire('forrest.response', [$formattedResponse]);