Skip to content

Commit efbb59e

Browse files
authored
refactor: dotify query parameters before sending them (#101)
1 parent b385604 commit efbb59e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/API/AbstractAPI.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use ArkEcosystem\Client\Contracts\API;
1818
use ArkEcosystem\Client\Http\Request;
1919
use GuzzleHttp\Client;
20+
use Illuminate\Support\Arr;
2021

2122
/**
2223
* This is the abstract resource class.
@@ -52,7 +53,9 @@ public function __construct(Connection $connection)
5253
*/
5354
protected function get(string $path, array $query = [])
5455
{
55-
$response = $this->connection->getHttpClient()->get($path, compact('query'));
56+
$response = $this->connection->getHttpClient()->get($path, [
57+
'query' => Arr::dot($query),
58+
]);
5659

5760
return json_decode($response->getBody()->getContents(), true);
5861
}

0 commit comments

Comments
 (0)