Skip to content

Commit

Permalink
Adds the query parameter to the guzzle call for GET requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Sep 20, 2017
1 parent a4ddb61 commit bc35c87
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Adapter/Adapter.php
Expand Up @@ -35,7 +35,7 @@ public function __construct(Auth $auth, String $baseURI);
*
* @return mixed
*/
public function get(String $uri, array $headers): ResponseInterface;
public function get(String $uri, array $query, array $headers): ResponseInterface;

/**
* @param String $uri
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/Guzzle.php
Expand Up @@ -38,9 +38,9 @@ public function __construct(Auth $auth, String $baseURI = null)
/**
* @inheritDoc
*/
public function get(String $uri, array $headers = array()): ResponseInterface
public function get(String $uri, array $query = array(), $headers = array()): ResponseInterface
{
$response = $this->client->get($uri, ['headers' => $headers]);
$response = $this->client->get($uri, ['query' => $query, 'headers' => $headers]);

$this->checkError($response);
return $response;
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/DNS.php
Expand Up @@ -88,7 +88,7 @@ public function listRecords(

$query = http_build_query($options);

$user = $this->adapter->get('zones/' . $zoneID . '/dns_records?' . $query, []);
$user = $this->adapter->get('zones/' . $zoneID . '/dns_records', $query, []);
$body = json_decode($user->getBody());

$result = new \stdClass();
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/PageRules.php
Expand Up @@ -86,7 +86,7 @@ public function listPageRules(

$query = http_build_query($options);

$user = $this->adapter->get('zones/' . $zoneID . '/pagerules?' . $query, []);
$user = $this->adapter->get('zones/' . $zoneID . '/pagerules', $query, []);
$body = json_decode($user->getBody());

$result = new \stdClass();
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/UARules.php
Expand Up @@ -31,7 +31,7 @@ public function listRules(

$query = http_build_query($options);

$user = $this->adapter->get('zones/' . $zoneID . '/firewall/ua_rules?' . $query, []);
$user = $this->adapter->get('zones/' . $zoneID . '/firewall/ua_rules', $query, []);
$body = json_decode($user->getBody());

$result = new \stdClass();
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/ZoneLockdown.php
Expand Up @@ -31,7 +31,7 @@ public function listLockdowns(

$query = http_build_query($options);

$user = $this->adapter->get('zones/' . $zoneID . '/firewall/lockdowns?' . $query, []);
$user = $this->adapter->get('zones/' . $zoneID . '/firewall/lockdowns', $query, []);
$body = json_decode($user->getBody());

$result = new \stdClass();
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/Zones.php
Expand Up @@ -82,7 +82,7 @@ public function listZones(

$query = http_build_query($options);

$user = $this->adapter->get('zones?' . $query, []);
$user = $this->adapter->get('zones', $query, []);
$body = json_decode($user->getBody());

$result = new \stdClass();
Expand Down

0 comments on commit bc35c87

Please sign in to comment.