From efbb59e15d056bb4c1b2885748d5cf54d2383264 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Wed, 11 Nov 2020 06:54:07 +0200 Subject: [PATCH] refactor: dotify query parameters before sending them (#101) --- src/API/AbstractAPI.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/API/AbstractAPI.php b/src/API/AbstractAPI.php index 0ca5346..257155c 100644 --- a/src/API/AbstractAPI.php +++ b/src/API/AbstractAPI.php @@ -17,6 +17,7 @@ use ArkEcosystem\Client\Contracts\API; use ArkEcosystem\Client\Http\Request; use GuzzleHttp\Client; +use Illuminate\Support\Arr; /** * This is the abstract resource class. @@ -52,7 +53,9 @@ public function __construct(Connection $connection) */ protected function get(string $path, array $query = []) { - $response = $this->connection->getHttpClient()->get($path, compact('query')); + $response = $this->connection->getHttpClient()->get($path, [ + 'query' => Arr::dot($query), + ]); return json_decode($response->getBody()->getContents(), true); }