From 1d3f11e4a3606a4be80501a7383e484553058d55 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Thu, 1 Jun 2023 11:25:23 +0200 Subject: [PATCH] feat: return http resp as assoc array --- src/Reflect/Client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Reflect/Client.php b/src/Reflect/Client.php index 766e309..7acdcc3 100644 --- a/src/Reflect/Client.php +++ b/src/Reflect/Client.php @@ -97,7 +97,8 @@ // The first header line and second word will contain the status code. $resp_code = (int) explode(" ", $http_response_header[0])[1]; - return [$resp_code, $resp]; + // Return response as [, ] + return [$resp_code, json_decode($resp)]; } // Make request and return response over socket